vue-highlight.js icon indicating copy to clipboard operation
vue-highlight.js copied to clipboard

dynamically reload highlightjs

Open maltegrosse opened this issue 6 years ago • 3 comments

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)});
});

maltegrosse avatar Aug 19 '19 17:08 maltegrosse

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

gluons avatar Aug 20 '19 08:08 gluons

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

maltegrosse avatar Aug 22 '19 08:08 maltegrosse

Can you give me some example?

gluons avatar Oct 11 '19 10:10 gluons