I want to add the feature of source code highlighting dynamically. Thus, I was looking for information about how to instantiate the plugin by code.
I achieved this with something like:
let textareaControl = document.getElementById("inspector-textarea-control-0");
let prismEditor = new Prism.Live(textareaControl);
However, I need to specify the language I want to highlight and don't know the best way to do so. Maybe this could be added to the README, so that I (and others) know how to use it properly
I want to add the feature of source code highlighting dynamically. Thus, I was looking for information about how to instantiate the plugin by code.
I achieved this with something like:
However, I need to specify the language I want to highlight and don't know the best way to do so. Maybe this could be added to the README, so that I (and others) know how to use it properly