Lovely.IO

The Next Generation of Front-Side

Package Info

Links
Size
3.43 KB (gzipped)
Author
Nikolay Nemshilov
License
MIT
Versions
CDN Links
Dependencies

Colorifier

Colorifier is a code highlighting tool for Lovely.IO

By default it doesn't require any configuration, just include the script on your page, or hook it up with Lovely. Once the document body is loaded it will automatically search for things like that

<pre data-lang="language">
  // some code in here
</pre>

Configuration

There are a bunch of options you might change if you like

Lovely(['colorifier'], function(Colorifier) {
  Colorifier.Options.tag    = 'pre';       // the tag name of the target elements
  Colorifier.Options.attr   = 'data-lang'; // the attribute with language
  Colorifier.Options.theme  = 'light';     // the color theme to use ('light' or 'dark')
  Colorifier.Options.gutter = true;        // show/hide the gutter

  Colorifier.initialize();                 // reinitializing with new settings
});

Copyright And License

This project is released under the terms of the MIT license

Copyright (C) 2011 Nikolay Nemshilov