I am currently trying to make a website where different codes are loaded in at different times. However the content of these codes are stored in a JSON file and are loaded in to the page through JS.
Prism.js seems to run syntax highlighting at load time and I would like to run syntax highlighting on the code after it has been loaded from the JS.
Is there any way I can do this using Prism?
You should be able to call one of
highlightAll(),highlightAllUnder()orhighlightElement()after the content has been loaded to highlight them: