Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please make it work while editing the content #10

Open
kopyl opened this issue Jul 15, 2022 · 2 comments
Open

Please make it work while editing the content #10

kopyl opened this issue Jul 15, 2022 · 2 comments

Comments

@kopyl
Copy link

kopyl commented Jul 15, 2022

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

@kopyl
Copy link
Author

kopyl commented Jul 15, 2022

The HTML becomes this after "highlighting":

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

@joshgoebel
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants