Needs review
Project:
CKEditor CodeSnippet
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
13 Jan 2019 at 23:47 UTC
Updated:
24 May 2019 at 19:43 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
kentr commentedComment #3
kentr commentedHere's a patch that fixes the issue.
I've confirmed that it works as expected.
highlight.jsdetectsno-highlightand returns in highlightBlock() as it should.The patch is actually rolled against
8.x-1.6, becausecodesnippet.settings.ymldoesn't appear to exist in8.x-1.x.Comment #4
jwilson3Highlight.js has support for 'plaintext', so the way I'm doing this is:
plaintext: 'Plain Text'Done. No patches needed for this in my opinion, as this ^ is the standard procedure for enabling any other language you might want to support. Doing this also get's you the latest version of highlight.js
9.x, which has a large number of improvements in the highlighting engine and theming customizations.Comment #5
kentr commented@jwilson
Yeah, it's possible to do it that way, and that's how I did it originally. But this misses the point.
Opting out of automatic highlighting is a typical enough use-case that it's a sane default feature for this module.
Drupal is making efforts to gain credibility and marketshare as a platform that's easy to use out of the box, and it's ridiculous that anyone would have to perform this manual workaround to simply use the opt-out feature that already exists in the bundled Highlight.js library.
In my experience, that doesn't work with composer-based deployment to stage / prod. For me, composer consistently overwrites the custom Highlight.js library with the bundled version.
This technique works with composer.