Prism - Awesome new syntax highlighter

Prism - Awesome new syntax highlighter
File Size: 1.7 MB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Prism is an Awesome new syntax highlighter  built with modern web standards in mind.

Features:

  • Dead simple - Include prism.css and prism.js, use proper HTML5 code tags (code.language-xxxx), done!
  • Intuitive - Language classes are inherited so you can only define the language once for multiple code snippets.
  • Light as a feather - The core is 1.6KB minified & gzipped. Languages add 0.3-0.5KB each, themes are around 1KB.
  • Blazing fast - Supports parallelism with Web Workers, if available.
  • Extensible - Define new languages or extend existing ones. Add new features thanks to Prism’s plugin architecture.
  • Easy styling - All styling is done through CSS, with sensible class names like .comment, .string, .property etc

How to use it:

1. Include prism.js and prism.css on the webpage.

<link href="prism.css" rel="stylesheet">
<script src="prism.js"></script>

2. Mark up a code block with <code> and <pre>

<pre>
  <code class="language-css">
    p { color: red }
  </code>
</pre>

Changelog:

2018-06-21

  • v1.1.5

 


This awesome jQuery plugin is developed by LeaVerou. For more Advanced Usages, please check the demo page or visit the official website.