Please make it work while editing the content
kopyl opened this issue · comments
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
The HTML becomes this after "highlighting":
Related: The duplicate issue opened against the main repo has been closed with wontfix
. highlightjs/highlight.js#3583