platosha / prism-element

Prism-based syntax highlighting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<prism-highlighter>

Syntax highlighting via Prism.

Place a <prism-highlighter> in your document, preferably as a direct child of <body>. It will listen for syntax-highlight events on its parent element, and annotate the code being provided via that event.

The syntax-highlight event's detail is expected to have a code property containing the source to highlight. The event detail can optionally contain a lang property, containing a string like "html", "js", etc.

This flow is supported by <marked-element>.

About

Prism-based syntax highlighting


Languages

Language:HTML 100.0%