辋川集

木末芙蓉花,山中发红萼,涧户寂无人,纷纷开且落

By - 陳 思敬

SyntaxHighlighter Bundled Brushes

SyntaxHighlighter uses separate syntax files called brushes to define its highlighting functionality.
From: http://alexgorbatchev.com/SyntaxHighlighter/
http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/

Brushes

Brush name Brush aliases File name
ActionScript3 as3, actionscript3 shBrushAS3.js
Bash/shell bash, shell shBrushBash.js
ColdFusion cf, coldfusion shBrushColdFusion.js
C# c-sharp, csharp shBrushCSharp.js
C++ cpp, c shBrushCpp.js
CSS css shBrushCss.js
Delphi delphi, pas, pascal shBrushDelphi.js
Diff diff, patch shBrushDiff.js
Erlang erl, erlang shBrushErlang.js
Groovy groovy shBrushGroovy.js
JavaScript js, jscript, javascript shBrushJScript.js
Java java shBrushJava.js
JavaFX jfx, javafx shBrushJavaFX.js
Perl perl, pl shBrushPerl.js
PHP php shBrushPhp.js
Plain Text plain, text shBrushPlain.js
PowerShell ps, powershell shBrushPowerShell.js
Python py, python shBrushPython.js
Ruby rails, ror, ruby shBrushRuby.js
Scala scala shBrushScala.js
SQL sql shBrushSql.js
Visual Basic vb, vbnet shBrushVb.js
XML xml, xhtml, xslt, html, xhtml shBrushXml.js

Installation

<!-- Core JS -->
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shCore.js"></script>
<!-- Include Brushes -->
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushXml.js"></script>
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushAS3.js"></script>
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushCss.js"></script>
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushJava.js"></script>
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushPython.js"></script>
<script type="text/javascript" src="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/scripts/shBrushSql.js"></script>
<!-- Core CSS -->
<link href="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/styles/shCore.css" rel="stylesheet" type="text/css" />
<!-- Default Theme -->
<link href="http://www1.pconline.com.cn/api/libs/syntaxhighlighter/3_0_83/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<!-- Content to Highlight -->
<pre class="brush: js">
    /**
     * SyntaxHighlighter
     */
    function foo()
    {
        if (counter <= 10)
            return;
        // it works!
    }
</pre>
<!-- Run the Highlighter -->
<script type="text/javascript">
    SyntaxHighlighter.defaults['toolbar'] = false;
    SyntaxHighlighter.all()
</script>

Leave a Reply

Your email address will not be published.
*
*