highlight js
Categories
Component ID
1774194
Component name
highlight js
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
177725
Component created
Component changed
Component body
Highlight.js highlights syntax in code examples on blogs, forums and in fact on any web pages. It's very easy to use because it works automatically: finds blocks of code, detects a language, highlights it.
Dependencies
Libraries API
highlight.js
Installation
- Download the module and place it in the sites/all/modules directory
- Download the highlight.js library and place it in the sites/all/libraries and rename it to highlightjs.
- Enable highlight js and highlight js filter module.
- Enable the filter setting for the filter format.
Usage
Use <code> to output code in a given language. In this case the library will try to detect the language automatically.
OR
Use <code lang="css"> to output code in a given language.
To disable highlighting of a fragment altogether use "no-highlight" class.
<code class="no-highlight">
