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

dynamically reload highlightjs #24

Open
maltegrosse opened this issue Aug 19, 2019 · 3 comments
Open

dynamically reload highlightjs #24

maltegrosse opened this issue Aug 19, 2019 · 3 comments
Labels

Comments

@maltegrosse
Copy link

Hello,
is it possible to reload highlight js somehow dynamically?
comparable to:

hljs.initHighlighting.called = false;
hljs.initHighlighting();

or

$(document).ready(function() {
   $('#myDiv').each(function(i, e) {hljs.highlightBlock(e)});
});
@gluons
Copy link
Owner

gluons commented Aug 20, 2019

You can use code property to bind to your dynamic code content.

@maltegrosse
Copy link
Author

thank you. But i am using it in a contentEditable="true" container and want to re render the highlightjs once changes are made

@gluons
Copy link
Owner

gluons commented Oct 11, 2019

Can you give me some example?

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

No branches or pull requests

2 participants