简码参数
这些参数你能够设置在简码中。对于布尔值(即 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]code[/php]. (代码语言)
autolinks — Toggle automatic URL linking.(将URL自动转换成链接)
classname — Add an additional CSS class to the code box.(加载额外CSS控制)
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-sperated 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.(自动换行)
一些简码示例
[@php]这里写你的代码[/php]
1
[@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"]这里写你的代码[/css]
帮助
example-filename.php1
[@code lang="js"]这里写你的代码[/code]
1
[@sourcecode language="plain"]这里写你的代码[/sourcecode]
1