highlightjs / highlightjs-terraform

terraform language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please make it work while editing the content

kopyl opened this issue · comments

commented

It's not currently possible to highlight the text on the fly.

If I enter this text into contenteditable field, then run this code:

hljs.registerLanguage('terraform', window.hljsDefineTerraform);
hljs.highlightAll();

I get this result: https://i.imgur.com/pYe2l91.png

commented

The HTML becomes this after "highlighting":

https://i.imgur.com/Q6MQL30.jpg

Related: The duplicate issue opened against the main repo has been closed with wontfix. highlightjs/highlight.js#3583