Lightweight jQuery Syntax Highlighting Plugin - Litelighter

File Size: 11.1KB
Views Total: 1747
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Lightweight jQuery Syntax Highlighting Plugin - Litelighter

Litelighter is a extremely lightweight yet elegant and powerful syntax highlighting plugin for jQuery. It comes with 2 themes (dark and light) and supports generic, html, js, and css by default. Adding languages is as simple as adding a new entry to an object.

You might also like:

How to use it:

1. Include jQuery library and jQuery Litelighter in the head section of your web page

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery-litelighter.js"></script>

2. Using data-* attributes to specify language and style to use

<pre data-lllanguage="html" data-llstyle="dark">
    ...
</pre>

3. Or using javascript

$('pre').litelighter({
    clone: true, // Whether to clone the existing object (true or false)
    style: 'light', // Which style to use. light and dark are available by default
    language: 'css' // which language to use. generic, js, html, css are available by default
});

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