Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Adds a few features to SHJS (Syntax Highlighter in JavaScript)
CSS JavaScript
tree: a3c6bcadc6

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
shjsx
src
LICENSE
README
example.html

README

Syntax Highlighter in JavaScript Extended (SHJSX)

Features
SHJS (http://shjs.sourceforge.net/) is a source code highlighter written in JavaScript and used for presenting code on the web.
	The stuffs that I added to SHJS are:
	1. Added line numbers, based on SHJS-Linenumbers (https://github.com/F1skr/SHJS-Linenumbers/blob/master/src/sh_main.js)
	2. 'Select All' option: Click the option, and the code gets selected. This is so you can copy-paste code quickly :)
	3. Word highlighting: Click on a word (or select a few letters of the word) in the code, and all occurrences of the word are highlighted.
	4. Brace highlighting: Click on a brace and it's matching brace get highlighted. 'Braces' include curly braces {}, square brackets [] and parenthesis ().
	5. Code title: Can add a header title to the code snippet (can be used to display something like "mysnippet.js | One line description").
	
Usage
Go through the source code of the example HTML file.
For using SHJS-Extended on your side, copy-paste the shjsx folder to your site.

Other notes
All the js files have been compressed (minified) with YUI compressor (http://developer.yahoo.com/yui/compressor/).

SHJS documentation is at the original SHJS project (http://shjs.sourceforge.net/).

Thanks to:
SHJS Author and F1skr (https://github.com/F1skr).
Something went wrong with that request. Please try again.