< Up a Level

Adding Extra Functionality With code-input.js’ Plugins

Learn by Example

Plugins for Any Highlighter

AutoCloseBrackets: Add closing brackets automatically when opening ones are typed

TODO

Autocomplete: Display a customisable popup next to the caret that can appear and disappear

TODO

FindAndReplace: Add an openable dialog to find and replace matches to a search term, including highlighting the matches

TODO

GoToLine: Add an openable dialog to go to a specific line and potentially column number

TODO

Indent: Make the Tab key and newlines after brackets do what you expect

TODO

SelectTokenCallbacks: Handle which highlighted tokens are selected in the code-input element, e.g. for visual effects

TODO

SpecialChars (unstable): Display a selection of characters as a colourful representation of their character codes

TODO

Plugins for highlight.js Only

Autodetect: Auto-detect the programming language live

TODO

Plugins for Prism.js Only

PrismLineNumbers: Add visible line numbers from Prism.js’ plugin of the same name

TODO

Dive Deeper

  • /plugins/new Creating your own code-input Plugin to add functionality