You are here: Browse Railsplugins Filtered Column Code Highlighter
A small plugin that provides a filter to wrap code that will then be picked up by CodeHighlighter for client side highlighting.
Ensure the code highlighter scripts are installed into your javascripts dir. After this, add the javascript include statements into your layout:
{{ 'code_highlighter' | javascript }}
{{ 'javascript' | javascript }} <!- one of these for each language you want to support ->
Ruby, JavaScript, HTML and CSS are included but you can write you own grammars easily.
Then in your posts do:
<filter:jscode lang="javascript">document.someScriptThing = "BOO"</filter:jscode>
(C) Dan Webb 2006 (dan@danwebb.net) Licensed under a MIT Licence.
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly