Skip to content
forked from ccampbell/rainbow

Code syntax highlighting library written in javascript

Notifications You must be signed in to change notification settings

fjakobs/rainbow

This branch is 656 commits behind ccampbell/rainbow:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 27, 2012
0d08f67 · Mar 27, 2012

History

91 Commits
Mar 26, 2012
Mar 27, 2012
Mar 27, 2012
Mar 25, 2012
Mar 26, 2012

Repository files navigation

Rainbow

Rainbow is a code syntax highlighting library written in Javascript.

It was designed to be lightweight (1.2kb), easy to use, and extendable.

It is completely themable via CSS.

Quick Start

  1. Include some markup for code you want to be highlighted:

    <pre><code data-language="python">def openFile(path):
        file = open(path, "r")
        content = file.read()
        file.close()
        return content</code></pre>
  2. Include a CSS theme file in the <head>:

    <link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
  3. Include rainbow.js and whatever languages you want before the closing </body>:

    <script src="/assets/js/rainbow.min.js"></script>
    <script src="/assets/js/language/generic.js"></script>
    <script src="/assets/js/language/python.js"></script>

More Info

You can check out the documentation and build custom packages at rainbowco.de.

About

Code syntax highlighting library written in javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published