How to use the Syntaxhighlighter

The syntaxhighlighter included with the Documentation app can be found at at Google Code.

Usage

To highlight your code, you'll need to put your code snippets in <pre class="prettyprint">...</pre> or <code class="prettyprint">...</code> and it will automatically be pretty printed.

Further you can make the syntax HTML 5 compliant by wrapping your code in <pre class="prettyprint"><code class="language-php">...</code></pre>

Include the syntaxhighlighter in your template

If you are not using the Documentation app and but want to use the Syntaxhightlighter anyway, you'll have to include the syntaxhighlighter in your app template. You'll need to add the following code snippets.

// include syntaxhighlighter
$this->app->document->addScript($this->template->resource.'libraries/prettify/prettify.js');
$this->app->document->addStylesheet($this->template->resource.'libraries/prettify/prettify.css');
<script type="text/javascript">
	jQuery(function($) { prettyPrint(); });
</script>

Documentation on Github

Help us out! If you are feeling that our documentation has errors or can be improved, fork it at Github and send us a pull request. Any contribution is much appreciated. Thank you!