Highlight.js is a stand-alone JavaScript tool for colorizing embedded source code. Currently Highlight.js supports 46 programming languages and 18 highlighting themes.
Under the hood, it works by automatically finding source code blocks, detecting the used programming language on its own and applying the selected highlighting theme to it. Highlight.js' speed depends on the amount of code it has to work with.
Being framework agnostic makes Highlight.js the perfect tool for integrating with any web-based source code editor or used in various CMS, blog or forum plugins.
Currently, Highlight.js has been used/integrated with WordPress, Drupal, phpBB 3, Firefox, Ruby on Rails, DokuWiki, Simple Machines Forum, Node.js, Mantis and TinyMCE, just to name few of the projects.
Check out various
demos of Highlight.js, and if interested, try to contribute to its code on
GitHub.
Download Highlight.js from our Scripts section here.