There are many options that can be applied inline to control how your formatted code is displayed. These are appended to the class definition after the brush declaration.
auto-links
Enabled by default. Disabling this turns off link detection in the highlighted section, making URLs non-clickable.
<pre class="brush: java"> String link = "http://www.megatome.com"; </pre> <pre class="brush: java; auto-links: false"> String link = "http://www.megatome.com"; </pre>
Output:
String link = "http://www.megatome.com";
String link = "http://www.megatome.com";
class-name
Use this to specify one or more classes that should be applied to the generated highlight element.
collapse
<pre class="brush: java"> String link = "http://www.megatome.com"; </pre> <pre class="brush: java; collapse: true"> String link = "http://www.megatome.com"; </pre>
Output:
String link = "http://www.megatome.com";
String link = "http://www.megatome.com";
first-line
1 by default. Change the starting line number for a section of highlighted code.
<pre class="brush: java"> String link = "http://www.megatome.com"; </pre> <pre class="brush: java; first-line: 20"> String link = "http://www.megatome.com"; </pre>
Output:
String link = "http://www.megatome.com";
String link = "http://www.megatome.com";
gutter
Enabled by default. Turn the line numbers on and off.
<pre class="brush: java"> String link = "http://www.megatome.com"; </pre> <pre class="brush: java; gutter: false"> String link = "http://www.megatome.com"; </pre>
Output:
String link = "http://www.megatome.com";
String link = "http://www.megatome.com";
highlight
Specify one or more lines to be highlighted.
<pre class="brush: java">
String link = "http://www.megatome.com";
System.out.println("Hello World");
System.out.println("Goodbye World");
</pre>
<pre class="brush: java; highlight: [1, 3]">
String link = "http://www.megatome.com";
System.out.println("Hello World");
System.out.println("Goodbye World");
</pre>
Output:
String link = "http://www.megatome.com";
System.out.println("Hello World");
System.out.println("Goodbye World");
String link = "http://www.megatome.com";
System.out.println("Hello World");
System.out.println("Goodbye World");
toolbar
Enabled by default. Toggle the toolbar.
<pre class="brush: java"> String link = "http://www.megatome.com"; </pre> <pre class="brush: java; toolbar: false"> String link = "http://www.megatome.com"; </pre>
Output:
String link = "http://www.megatome.com";
String link = "http://www.megatome.com";
title
Allows a title to be set for a block of code. This is not in the
class, but in the <pre/> or <script/> tags.
<pre class="brush: java" title="Here is some Java"> String link = "http://www.megatome.com"; </pre>
Output:
String link = "http://www.megatome.com";
Additional Options
There are more options available. See http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/ for the full list.