Was easy as adding this to list_highlights()

  if (module_exists('highlight_js')) {
    $highlights['HIGHLIGHT'] = 'Highlight.js';
  }

Comments

rerooting’s picture

The only problem is that highlight.js wants <code> and not <pre> tags. This should help

$("pre").each(function (i, e) {
    	hljs.highlightBlock(e);
});
PJnes’s picture

Thanks 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.

PJnes’s picture

I'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

PJnes’s picture

Version: » 7.x-1.x-dev
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.