CKEditor CodeSnippet MathStats module for Drupal 8.
Adds syntax highlighting support for Mathematics and Statistics heavy languages in HTML <code>
regions. The list of supported languages is by no means all-inclusive so please, post an issue if you think the list should be updated.
Note: This module will clash with existing highlight.js libraries, you may need to build a custom package and place it in your libraries folder: /<drupal-root>/libraries/codesnippet/lib/highlight
.
To enable syntax highlighting, add the prefix "language-*" to any identifier listed in the table below to the class section of a code block.
Example:
<code class="language-r"><code>
Language | Identifier |
---|---|
Basic | basic |
C/C++ | cpp |
Haskell | haskell |
JSON | json |
JavaScript | javascript |
LaTeX/TeX | tex |
Markdown | markdown |
Matlab | matlab |
Perl | perl |
Python | python |
R | r |
SAS | sas |
Scilab | scilab |
STATA | stata |