Author: Alex Gorbatchev http://alexgorbatchev.com/SyntaxHighlighter/ Syntax Highlighter
Author: Bob Ray http://bobsguides.com Bob's Guides
Documentation is available at Bob's Guides
SyntaxHighlighter is fairly straight port of Alex Gorbatchev's great JS syntax highlighter, adapted for MODX Revolution. The package includes both a plugin and a snippet version of the highlighter. All of the code in this component, other than the plugin, snippet, and install script, was written by Alex Gorbatchev.
Add the SyntaxHighlighter snippet on the page that needs syntax highlighting.
[[!SyntaxHighlighter? &brushes={BRUSH,BRUSH}
&theme={THEME}
]]
&brushes
- Default:JScript,Xml,Php,Css,Plain
&theme
- Default:Default
List of available brushes:
AppleScript, AS3, Bash, ColdFusion, Cpp, CSharp, Css, Delphi, Diff, Erlang, Groovy, Java, JavaFX, JScript, Perl, Php, Plain, PowerShell, Python, Ruby, Sass, Scala, Sql, Vb, Xml
List of available themes:
Default, Django, Eclipse, Emacs, FadeToGrey, MDUltra, Midnight, RDark
###Step 2
Wrap your code in a <pre>
tag and specify the brush along with additional options found here
Example:
<pre class="brush: jscript; toolbar: false;">
console.log('Hello World!');
</pre>