Skip to content
Josh Goebel edited this page Apr 21, 2022 · 14 revisions

Useful Plugins

If you have written a useful plugin for Highlight.js, please feel free to add it to the list below. If you're thinking about it, please have a look at our plugin API. We're also happy to answer questions on our Discord if you need help.

Plugins

  • LineifyPlugin: Restructures the output of Highlight.js to elements corresponding to lines, to simplify line-oriented code listings. Highlighting lines and adding line numbers can be achieved by setting attributes on the parent (code) element.
  • Line Number Plugin: Add line number feature to Highlight.js.
  • Language Autoloader Plugin: JIT (Just in Time) plugin for Highlight.js to load language files automatically via CDN, efficiently.
  • lineToDiv: Simple plugin that transforms each line in a div element. User can configure class name and/or sequential id's for lines. With this set, it is possible to add line numbers with ::before css property, manage eventListeners for clicks in each line, or dynamically change attributes for a specific line.
  • Add your plugin here... 😀

Legacy Plugins

Some functionality has been removed from the core library with the newest releases but can be added back via plugins. There are often better ways than using plugins though, see the version 11 upgrade notes.

  • Former useBR functionality #2259 (not maintained)
  • Former tabReplace functionality #2874 (not maintained)
  • Former HTML merging functionality #2889 (not maintained)
  1. José e Maria Maria
  2. José J&M
Clone this wiki locally