WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Crayon Syntax Highlighter

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

A Syntax Highlighter built in PHP and jQuery that supports customizable languages and themes. It can highlight from a URL, a local file or WordPress post text. Crayon makes it easy to manage Language files and define custom language elements with regular expressions. It also supports some neat features like:

  • Integrated Theme Editor!
  • Tag Editor in both Visual & HTML editors
  • Toggled plain code
  • Toggled line numbers
  • Copy/paste code
  • Open code in a new window (popup)
  • Line wrapping
  • Code expanding
  • Minimizing
  • bbPress 2 support
  • Converting legacy code in blog posts/comments to <pre>
  • Remote request caching
  • Mixed Language Highlighting in a single Crayon
  • Mini Tags like [php][/php]
  • Inline Tags floating in sentences
  • Crayons in comments
  • `Backquotes` become <code>
  • <pre> tag support, option to use setting-value in the class attribute
  • Valid HTML 5 markup
  • Visual & HTML editor compatible
  • Mobile/touchscreen device detection
  • Mouse event interaction (showing plain code on double click, toolbar on mouseover)
  • Tab sizes
  • Code title
  • Toggled toolbar
  • Retina buttons
  • Striped lines
  • Line marking (for important lines)
  • Line ranges (showing only parts of the code)
  • Starting line number (default is 1)
  • Local directory to search for local files
  • File extension detection
  • Live Preview in settings
  • Dimensions, margins, alignment, font-size, line-height, float
  • Extensive error logging

Links

Contributions

There are many ways you can help!

  • Make a Theme and share
  • Add support for your favourite Language
  • Write a post about your pastel experiences and share
  • Donate to the project

Supported Languages

Languages are defined in language files using Regular Expressions to capture elements. See the Crayon Language File Specification to learn how to make your own.

International Languages

Articles

These are helpful for discovering new features.

The Press

A handful of articles from others written about Crayon, thanks guys!

Future Development

  • Performance, minimised resources
  • Theme Editor
  • Integrated commenting

Donations

Thanks to all those who donate to the project:

Requires: 3.0 or higher
Compatible up to: 3.9.2
Last Updated: 2014-6-28
Downloads: 260,688

Ratings

4 stars
4.8 out of 5 stars

Support

0 of 10 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 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,5,5 100,2,2
100,3,3 67,3,2 100,1,1 100,1,1 100,2,2
100,5,5 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,6,6
100,2,2 50,2,1 100,2,2 100,4,4 0,1,0 100,1,1 100,1,1
100,2,2 100,3,3 100,2,2 33,6,2 100,2,2 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,2,2 33,3,1 100,8,8 67,3,2 100,1,1
67,3,2 100,3,3 100,2,2 0,1,0
75,4,3 100,1,1
60,5,3 100,1,1
67,3,2
100,1,1 100,6,6
100,1,1 0,1,0 100,3,3 100,3,3
100,1,1
100,1,1 0,2,0
0,1,0 40,10,4 100,1,1
67,3,2 100,3,3