Доступные теги (шорткоды):

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

Используется как:

[BrushName]...code...[/BrushName]

Пример:

[python]...code...[/python]

Ниже, параметры, которые можно передать в теги. Для boolean (которые on/off), можно передать true/1 или false/0.

lang or language — The language syntax to highlight with. You can alternately just use that as the tag, such as

[php][/php]

autolinks — Toggle automatic URL linking.
classname — Add an additional CSS class to the code box.
collapse — Toggle collapsing the code box by default, requiring a click to expand it. Good for large code posts.
firstline — An interger specifying what number the first line should be (for the line numbering).
gutter — Toggle the left-side line numbering.
highlight — A comma-separated list of line numbers to highlight. You can also specify a range. Example: 2,5-10,12
htmlscript — Toggle highlighting any extra HTML/XML. Good for when you’re mixing HTML/XML with another language, such as having PHP inside an HTML web page. The above preview has it enabled for example. This only works with certain languages.
light — Toggle light mode which disables the gutter and toolbar all at once.
padlinenumbers — Controls line number padding. Valid values are false (no padding), true (automatic padding), or an integer (forced padding).
title (v3 only) — Sets some text to show up before the code. Very useful when combined with the collapse parameter.
toolbar — Toggle the toolbar (buttons in v2, the about question mark in v3)
wraplines (v2 only) — Toggle line wrapping.

Some example shortcodes:

[php]your code here[/php]
[css autolinks="false" classname="myclass" collapse="false" firstline="1" gutter="true" highlight="1-3,6,9" htmlscript="false" light="false" padlinenumbers="false" smarttabs="true" tabsize="4" toolbar="true" title="example-filename.php"]your code here[/css]
[code lang="js"]your code here[/code]
[sourcecode language="plain"]your code here[/sourcecode]

Добавить комментарий