Adds a shortcode integration for using Highlight.js in the WYSIWYG editor.
/libraries
directory in
this module's root folder, e.g /libraries/highlightjs/
.When you edit a node using the WYSIWYG text filter, you'll see button with brackets that allows you to enter code syntax.
Once the dialog window is open, you can choose the language and insert the code syntax.
Then you will see a shortcode [code lang="php"]$foo = "bar";[/code]
inserted into the body field with line breaks and indentation preserved.
Once saved, the code is rendered with syntax highlighting. You can change the theme by setting a variable, drush vset csh_theme sunburst
, and the
themes are located at https://highlightjs.org/static/demo/.
Bugs and Feature requests should be reported in the Issue Queue: https://github.com/backdrop-contrib/highlightjs_wysiwyg/issues.
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.