I’m trying to get the following plugin for Highlight.js to work.
Problem is that I don’t seem to have access to the
hljs object and I am at a total loss as to how Discourse includes the Highlight.js code and styling.
Can anyone give me some pointers?
It is done via
There is no existing hook to extend highlight js, but you can run decorateCooked in your plugin to apply further transforms to cooked.
Thanks, I’ll have a look
Is decorateCooked documented anywhere though? Couldn’t find anything at http://docs.discourse.org
Yeah, guess that would work