Picture of Matt Leathes
Re: Using highlight.js (code highlighting) or similar in Adapt framework
by Matt Leathes - Monday, 17 August 2020, 4:38 PM
 

Hey Kristian

I know someone has built a textWithCode plugin in the past that allows for code highlighting but I'm not sure how much that will help you here, except as a demo of how such a thing might be built. Equally there's the mathJax extension which does something similar but at a global level so can be used anywhere rather than in one specific component.

Do you need to build this in the Authoring tool? Reason I ask is that I have a feeling the text editor in the authoring tool has a habit of meddling with HTML, at least according to this thread. So even if you were to get highlight.js working (which will probably require building an extension to load it in) it might be that you can't just copy and paste the HTML in... which definitely wouldn't be a problem if building in the Framework as you'll be editing the JSON files directly.