{SourceCodeHighlighter language="string" line_numbers="false|true" start_at_line="number" highlight_line="value" code_container="type" header="string" footer="string" strip_html="true|false"}

Source code to be highlighted


Colors the text between the tag for easy readability.

Params for SourceCodeHighlighter:

language: The language in which the source code should be highlighted.

line_numbers: Indicates if line numbers should be displayed or not. Default: false

start_at_line: Defines the starting line number. (Only relevant if line numbers are specified.)

highlight_line: A comma separated list of lines, which should be highlighted. (Always starting at 1.)

code_container: Defines the wrapping HTML element around the source code. Default: PRE

Other possible values are: DIV, PRE_VALID, PRE_TABLE, NONE

For the exact behavior have a look at the GeSHi documentation.

header: Text or HTML code which should be inserted into the header.

footer: Text or HTML which should be inserted into the footer.

strip_html: Secifies if quotas like &amp should be converted or not. If you are working with a raw editor set this to false. Default: true

How to use it:

{SourceCodeHighlighter language="php" line_numbers="true" start_at_line="3" highlight_line="3, 5" code_container="pre" header="PHP code" footer="* line five can cause performance issues"}
$fruits = array("apple", "raspberry", "blackberry", "banana");

for($i = 1; $i < count($fruits); $i++)
echo $fruits[$i];


Available for:


© 2010 - 2017 FINWICK® UG

We have 38 guests and no members online