Plugin Directory

Crayon Syntax Highlighter

Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.

How do I use the Tag Editor?

The Tag Editor provides a dialog box to add Crayons easily.

How do I use it manually?

[crayon lang="php"] your code [/crayon]
[crayon url="http://example.com/code.txt" /]
[crayon url="/relative-path-added-to-local-path-defined-in-settings/code.java" /]

You can use <pre>:

<pre lang="php"> your code </pre>

You can use an HTML5 compliant <pre> (recommended):

<pre class="lang:php mark:1-4,3" title="some title"> your code </pre>

You can also use Mini Tags:

[php theme="twilight"]your code[/php]
[php url="https://raw.github.com/somefile.php" /]

Please see the documentation for more details.

Why are the controls not working?

Make sure jQuery is included in your theme ONCE and before all its dependents (see Installation).

Why am I only seeing [crayon-3ffr7fa34a321/]?

Your theme is being naughty. Find where it prints the content/excerpt on that page in the PHP and make sure to add this line before printing:

$output = apply_filters('the_content', $output);

This ensures that the content can be filtered by plugins, such as Crayon. Otherwise, Crayon detects and creates the code but can't replace those funny looking tags in the content.

Support

Contact me at http://twitter.com/crayonsyntax or crayon.syntax@gmail.com.

Requires: 3.0 or higher
Compatible up to: 3.3.2
Last Updated: 2012-5-18
Downloads: 23,011

Average Rating

4 stars
(43 ratings)

Support

1 of 1 support threads in the last three weeks have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

4 people say it works.
0 people say it's broken.

100,1,1
100,1,1 100,1,1 50,2,1 100,1,1 100,1,1 100,1,1 100,1,1 100,3,3 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,2,2 100,2,2 100,1,1 100,1,1 100,2,2
100,2,2 100,1,1 100,1,1 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 100,4,4 100,2,2 100,2,2 100,2,2 100,3,3 100,5,5 83,6,5 100,2,2 100,1,1 100,1,1 100,1,1
100,3,3 100,3,3 100,1,1 100,4,4