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.
- 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.
Use <code> to output code in a given language. In this case the library will try to detect the language automatically.
Use <code lang="css"> to output code in a given language.
To disable highlighting of a fragment altogether use "no-highlight" class.
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 296 sites currently report using this module. View usage statistics.
- Downloads: 177,422
- Last modified: 2 December 2014
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.