A collection of web components based on prism.js
http://christiankohler.github.io/PrismComponents/
Install via npm
npm install prism-components
Include the dist/prism-components.html
file in your project.
<link rel="import" href="prism-components.html">
Use the prism language components to highlight your code
<pre is="lang-css">.car { color:#FFF; }</pre>
<pre is="lang-javascript">
function say(message) {
console.log(message);
}
</pre>
Use Chrome 36 or higher to use web-presentation without a polyfill.
npm install
npm run build
Don't use this components in a public website since it works only on Chrome 36 or higher. On a browser without web components support, the user still sees the code but without highlighting.