Open kopyl opened 2 years ago
It's not currently possible to highlight the text on the fly.
If I enter this text into contenteditable field, then run this code:
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":
https://i.imgur.com/Q6MQL30.jpg
Related: The duplicate issue opened against the main repo has been closed with wontfix. https://github.com/highlightjs/highlight.js/issues/3583
wontfix
It's not currently possible to highlight the text on the fly.
If I enter this text into contenteditable
field, then run this code:
I get this result: https://i.imgur.com/pYe2l91.png