gluons / vue-highlight.js

📜 Highlight.js syntax highlighter component for Vue.
https://git.io/vue-highlight.js
MIT License
208 stars 24 forks source link

dynamically reload highlightjs #24

Open maltegrosse opened 5 years ago

maltegrosse commented 5 years ago

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 commented 5 years ago

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

maltegrosse commented 5 years ago

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

gluons commented 4 years ago

Can you give me some example?