Install
Install via npm
The CSS Custom Highlight API is not supported in this browser.
Install via npm
Import as ES module
Or via CDN
Make sure to load a theme e.g. syntax-highlight-element/themes/prettylights.css
.
Or via CDN
Currently there are only limited themes available/converted. You can always create your own theme. Contributions are also very welcome.
language
The syntax language. The default is plaintext
. Default suported languages html|css|js
.
content-selector
A CSS selector to specify the content element. The default is the element itself.
Full list of all languages supported by the prism tokenizer.