Highlight Code with EnlighterJS for WordPress is pretty easy and the results are awesome. There are plenty of highlighter frameworks around for WordPress, such as Crayon.js and Highlighter.js, but I prefer this one.
It’s faster and lighter than Crayon while offering most of its options. Also I like the WordPress plugin integration better.
This is even easier! Just install their plugin: WP Enlighter
Then make sure to active it and select the CDN for the MooTools framework:
Code added with the add code button will look like this in your posts:
<pre class="EnlighterJSRAW" data-enlighter-language="html"><!--load EnlighterJS:--> ...some js code.. </pre>
For standalone sites
First you need to download the package. EnlighterJS css and JS are note currently available on cdnjs for some reason:EnlighterJS.zip
Then all you have to do is adding this code:
Pretty straightforward isn’t it?