Syntax
To insert code snippet into your post (or comment) you should use <code lang=”lang”>code</cc> syntax. Starting from version 0.6.0 you could specify additional CodeColorer options inside [cc] tag:
<cc lang="php" tab_size="2" lines="40" no_cc = 1> // some code here </cc>
Note: You should always use double quotes or single quotes around the parameter value. Boolean values could be passed using string true or false, number 1 or 0.
Possible parameters:
- lang (string) — source language.
- tab_size (integer) — how many spaces would represent TAB symbol.
- line_numbers (boolean) — when true line numbers will be added.
- first_line (integer) — a number of the first line in the block.
- no_links (boolean) — when false keywords will be represented as links to manual.
- lines (integer) — how many lines would be block height without scroll; could be set to -1 to remove vertical scrollbar.
- width (integer) — block width.
- height (integer) — height in pixels; used when lines number is greater then “lines” value.
- theme (string) — color theme (default, blackboard, dawn, mac-classic, twitlight, vibrant).
- no_cc (boolean) — when true the syntax in code block will not be highlighted, code will be rendered inside <code></code> tag.
All of these parameters could be configured via the CodeColorer options page.
CodeColorer Home Page