Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Was easy as adding this to list_highlights()
if (module_exists('highlight_js')) {
$highlights['HIGHLIGHT'] = 'Highlight.js';
}
Comments
Comment #1
rerooting CreditAttribution: rerooting commentedThe only problem is that highlight.js wants
<code>
and not<pre>
tags. This should helpComment #2
PJnes CreditAttribution: PJnes commentedThanks for this. I was aware of the first bit, but I think it's the second bit that was causing me issues.
If you want to roll a patch then I'd be happy to accept it, otherwise it's probably going to be later this month before I can take a look at getting this added in and tested.
Comment #3
PJnes CreditAttribution: PJnes as a volunteer commentedI've just added support for highlight js to 1.x-dev. It doesn't seem to need the JS suggested above any more.
Tested it working with CKEditor 4.4.7, PBCKCode 1.2.3 and highlightjs 8.5.0
Comment #4
PJnes CreditAttribution: PJnes as a volunteer commented