css configure
Name | Value | Description |
---|---|---|
auto-links | true | Allows you to turn detection of links in the highlighted element on and off. If the option is turned off, URLs won’t be clickable. Click here for a demo. |
class-name | '' | Allows you to add a custom class (or multiple classes) to every highlighter element that will be created on the page. Click here for a demo. |
collapse | false | Allows you to force highlighted elements on the page to be collapsed by default. Click here for a demo. |
first-line | 1 | Allows you to change the first (starting) line number. Click here for a demo. |
gutter | true | Allows you to turn gutter with line numbers on and off. Click here for a demo. |
highlight | null | Allows you to highlight one or more lines to focus user’s attention. When specifying as a parameter, you have to pass an array looking value, like [1, 2, 3] or just an number for a single line. If you are changing SyntaxHighlighter.defaults['highlight'] , you can pass a number or an array of numbers. Click here for a demo. |
html-script | false | Allows you to highlight a mixture of HTML/XML code and a script which is very common in web development. Setting this value to true requires that you have shBrushXml.js loaded and that the brush you are using supports this feature. Click here for a demo. |
smart-tabs | true | Allows you to turn smart tabs feature on and off. Click here for a demo. |
tab-size | 4 | Allows you to adjust tab size. Click here for a demo. |
toolbar | true | Toggles toolbar on/off. Click here for a demo. |
brush
Brush name |
Brush aliases |
ActionScript3 |
as3, actionscript3 |
Bash/shell | bash, shell |
ColdFusion |
cf, coldfusion |
C# |
c-sharp, csharp |
C++ |
cpp, c |
CSS |
css |
Delphi |
delphi, pas, pascal |
Diff |
diff, patch |
Erlang |
erl, erlang |
Groovy | groovy |
JavaScript | js, jscript, javascript |
Java | java |
JavaFX | jfx, javafx |
Perl | perl, pl |
PHP | php |
Plain Text | plain, text |
PowerShell | ps, powershell |
Python | py, python |
Ruby | rails, ror, ruby |
Scala | scala |
SQL | sql |
Visual Basic | vb, vbnet |
XML | xml, xhtml, xslt, html, xhtml |