Urvanov Syntax Highlighter


Reincarnation of Crayon Syntax Highlighter. Somewhere in documentation and in UI it still shows like Crayon. Don’t be scrared of this.

Use special Urvanov Syntax Highlighter block in new posts. Don’t use standard Code block.

How to use the plugin:

A Syntax Highlighter built in PHP and jQuery that supports customizable languages and themes.
It can highlight from a URL, 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
  • 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)
  • File extension detection
  • Live Preview in settings
  • Dimensions, margins, alignment, font-size, line-height, float
  • Extensive error logging



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


These are helpful for discovering new features (Links don’t work. TODO: think about moving it to my site).

The Press

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


Thanks to all those who donate to the project:

  • Kay Bothfeld, (https://www.scio.de), Germany
  • Sevim Tunc, UK
  • Andreas Hauck, Germany
  • Felipe Tonello, UK
  • Zeyi Wang, USA
  • Michal Owsiak, (http://owsiak.org), Poland
  • Andres Castano, (http://acastano.com), USA
  • Alok Choudhary, (http://alokchoudhary.com), USA
  • Joe Sabate, Spain
  • Kai Chen, Canada
  • Chen Kaiyuan, China
  • Kamarul Musa, Malaysia
  • WallyWare, Inc., (https://pi-plates.com), USA
  • Stéphane Rochat, (http://stephanerochat.ch), Switzerland
  • Brennan Hale-Matthews, Canada
  • Robert Giczewski, (http://www.lazydaemon.de/), Germany
  • Hoke Media, (http://hoke.media/), USA
  • Matthew Hood, Australia
  • Brian Williams, USA
  • Christian Martens, (http://insgesamt.net/), Germany
  • Nilesh Govindrajan, (http://nileshgr.com/), India
  • ZengChun Yang, China
  • Alan Kaplan, (http://www.akaplan.com/blog), USA
  • Christopher Yarbrough, (http://chrisyarbrough.com/), Germany
  • Johann Weiher, (http://codequartett.de/), Germany
  • Samuel Deering, Australia
  • Billiard Greg, (http://billiardgreg.com/), USA
  • Performance Simulations, (http://www.performancesimulations.com/), USA
  • Lindsay Ross, (http://gravelrash.com), New Zealand
  • Ruperto Coronado Muñoz, Mexico
  • Stefan Onderka, (http://www.onderka.com), Germany
  • Peter Kellner, (http://peterkellner.net), USA
  • Open Hardware Design Group LLC, (http://opensourcehardwaregroup.com/), USA
  • Helen McManus, (http://invisiblepixels.org/InvisibleWords/), Netherlands
  • Thomas Fee, UK
  • Julie Knowles, (http://knowlesfamily.com/), USA
  • Peter Kriegel, (http://www.powershell-group.eu/), Germany
  • Geo My WP, (http://geomywp.com), USA
  • Raffael Vogler, Germany
  • Erdal Cicek, Turkey
  • Cloud-VPS, Poland
  • Łukasz Bereza, Poland
  • Laurence Scotford, UK
  • Goretity Árpád László, (http://h2co3.org/blog), Hungary
  • AdsProvider, USA
  • Alicia Ramirez, (http://aliciaramirez.com/), Canada
  • William Eisert, USA
  • Inappix Development, (http://www.inappix.com/), Switzerland
  • Stephen Sant, (http://thesantfamily.net/), UK
  • David Rodriguez, (http://davidarodriguez.com/), USA
  • Chris Moore, (http://moorecreativeideas.com/), USA
  • Sohail Ahmed, (http://sohail.io.com/), USA
  • Vanessa Garcia Espin, Spain
  • Samad Malik, (http://samadmalik.com/), USA
  • Wabbit Wanch Design, (http://www.wabbitwanch.com/), Canada
  • Inopox Ltd, (http://inopox.com/), Cyprus
  • Kho Minh Vi, (http://khominhvi.com/), UK
  • Ivan Churakov, Russia
  • Carla Macías González, Mexico
  • Saulius Stonys, Lithuania
  • Konstantin Sabel, Germany
  • Luigi Massa, (http://bwlab.it/), Italy
  • Anthony Steiner, (http://steinerd.com/), USA
  • Alexander Harvey, (http://alexharvey.eu/), UK
  • Minhazul Haque Shawon, Cyprus
  • Raam Dev, (http://raamdev.com/), USA
  • Scot Ranney, (http://scotsscripts.com/), USA
  • Nico Hartung, (http://www.loggn.de/), Germany
  • Joseph DeVenuta, USA
  • Iván Prego García, Spain
  • Johannes Luijten, (http://www.tweaking4all.com/, http://www.weethet.nl/), USA
  • Jack Fruh, (http://basementjack.com/), USA
  • Ross Barbieri, USA
  • Will, Simple Phishing Toolkit (http://www.sptoolkit.com/), USA
  • Tricia Aanderud, USA
  • Tarek Sakr, (http://centrivision.com/), USA
  • Jeff Benshetler, (http://branchpoint.net/), USA
  • Oldrich Strachota, (http://www.strachota.net/), Czech Republic
  • Dividend Ninja, (http://dividendninja.com/), Canada
  • Chris Wiegman, (http://bit51.com/), USA
  • Sven Meier, (http://www.codesix.net/), Germany
  • Christy Wiggins, (http://www.jinxyisms.com/), USA
  • eSnipe, Inc. (http://esnipe.com/), USA (again!)
  • Aliseya Wright, (http://blog.xoxothemes.com/), USA
  • Jeremy Worboys (http://complexcompulsions.com/), Australia
  • Steve McGough, Spider Creations, LLC. (http://spidercreations.net/), USA
  • eSnipe, Inc. (http://esnipe.com/), USA
  • Gerald Drouillard (http://www.drouillard.biz/), USA
  • Greg Pettit (http://blog.monkey-house.ca/), Canada
  • Waimanu Solutions (http://daveblog.waimanu.web44.net/), USA
  • Andrew McDonnell (http://blog.oldcomputerjunk.net/), Australia
  • Perry Bonewell (http://pointatthemoon.co.uk/), United Kingdom
  • Nick Weisser (http://www.openstream.ch/), Switzerland


This plugin provides 1 block.

  • Urvanov Syntax Highlighter


  • Download the .zip of the plugin and extract the contents.
  • Upload it to the WordPress plugin directory and activate the plugin.
  • Even easier, just go to Plugins > Add New and search for “Urvanov Syntax Highlighter”.
  • You can change settings and view help under Settings > Crayon in the WordPress Admin.
  • Make sure your theme either manually specifies jQuery, or uses the version shipped with WordPress (recommended). You should NOT print out jQuery manually in the header as a script tag. Enqueueing it in WordPresss will prevent duplicate jQuery includes (also bad) and will allow other scripts to be placed AFTER jQuery in the head tag so they can use it. If you’re uncertain, just let WordPress handle it and remove any jQuery script tags you find in your theme’s header.php.
  • Oll old Crayon inline and blocks should work by default.
  • Don’t use standard Code block in new posts. Use special Urvanov Syntax Highlighter block in Gutenberg editor.


Please see the documentation for all the details.


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


February 22, 2024 1 reply
Im using it in wordpress 6.4.3. But there is one important thing: it doesnt work with default editor. I installed plugin Classic Editor, now it’s working great!
December 31, 2021
This plugin is literally the best one out there. Of all the ones I have reviews (many) this one has all the features, and MORE!!! Awesome, absolutely phenomenal Must have – copy button ✅ – languages ✅ Bash, c#, Docker, JSON, Go, Powershell, Python Would be nice – in-line support ⭐️ – Multi-line has folding option ⭐️ ____________________________________________ 1. Enlighter 2. My Syntax Highlighter 3. Syntax Highlighter for Theme/Plugin Editor 4. Prismatic 5. SyntaxHighlighter Evolved 6. Highlighting Code Block 7. CodeMirror Blocks 8. WP Githuber MD – WordPress Markdown Editor 9. Urvanov Syntax Highlighter 10. Code Syntax Block 11. Syntax-Highlighting Code Block 12. Markdown pure 1. Enlighter – copy button ✅ – languages ✅ – in-line-support ⭐ – multi-line folding ❌ Gutenberg looks pretty verbose 7. CodeMirror Blocks – copy button ✅ – languages ✅ – in-line-support ❌ – multi-line folding ❌ Looks really nice Themes I like: Lesser-dark, do they have vscode theme?, Lucario, Material, Mbo, Monokai 9. Urvanov Syntax Highlighter – copy button ✅ – languages ❌ No docker buuut… – in-line-support ✅ – multi-line folding 🌟 10. Code Syntax Block – copy button – languages – in-line-support – multi-line folding 11. Syntax-Highlighting Code Block – copy button – languages – in-line-support – multi-line folding ################ No thanks ######################## 12. HTML Editor Syntax Highlighter❌ Not even a frontend highlighter – copy button – languages – in-line-support – multi-line folding 2. My Syntax Highlighter – copy button ❌ – languages 🟡 (have to pay) – in-line-support – multi-line folding 🌟 3. Syntax Highlighter for Theme/Plugin Editor ❌ not even frontend highlighter – copy button – languages – in-line-support – multi-line folding 4. Prismatic – copy button ✅ – languages ❌ No docker, but has markdown – in-line-support ❌ – multi-line folding ❌ Just didn't like it 5. SyntaxHighlighter Evolved – copy button ❌ – languages ❌ No bash or Dockerfile – in-line-support ❌ – multi-line folding ❌ not intuitive 6. Highlighting Code Block – copy button ✅ – languages ❌ No docker and go, no YAML – in-line-support ❌ – multi-line folding ❌ 8. WP Githuber MD – WordPress Markdown Editor – copy button ✅ – languages 🟡 doesn't highlight very well – in-line-support ❌ – multi-line folding ❌ not intuitive Just don't like it Copy button was great though
September 23, 2021
Thank you so much, Fedor, for bringing Crayon´s features back to us without the need for any content changes and without the fear for PHP updates.
Read all 19 reviews

Contributors & Developers

“Urvanov Syntax Highlighter” is open source software. The following people have contributed to this plugin.


“Urvanov Syntax Highlighter” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “Urvanov Syntax Highlighter” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



    • Bug in processing comments.


    • Added interpolated expressions highlighting to JavaScript language.
    • Warnings about global comment variable in comment highlighting.
    • Minified min.js files.


    • Added “Highlight code” setting in “Code” section of plugin settings.
    • CSRF vulnerability in the theme editor and the tag editor. Added nonces.
    • Replaced deprecated jQuery “live” to jQuery “on”


    • Copy button should work even without “Toggle plain text” button.


    • Enabled “Copy” button for touch screens.


    • Removed my_custom_render


    • Made Urvanov_Syntax_Highlighter_Plugin::my_custom_render public and static.


    • Check HTTP_USER_AGENT existance in $_SERVER array


    • Green White theme from Di_Skyer (http://atlocal.net/)
    • Brasil Portuguese translation from Eric Sornoso (https://mealfan.com)
    • Zidingyi theme from seouc (http://www.seouc.com/)
    • rob-stoecklein fix for KnowAll theme (https://github.com/urvanov-ru/crayon-syntax-highlighter/pull/37)


    • New japanese translation from Jin Koyama (https://tabibitojin.com/).


    • Copy button copied incorrect code for HTML entities.


    • Fixed some links to help page
    • Copy button text.
    • Line numbers copied when you copied page content


    • Updated copy button behaviour
    • Turned back to jQuery ready function
    • updated readme


    • Kotlin support
    • TypeScript support


    • Basic example for a new block
  • FIXED:
    • error in JS log function


    • Removing jQuery. Replaced jQuery.ready to DOMContentLoaded


    • Simple release without any changes.


    • Replaced version_compare to standart PHP function.


    • More detailed log to version compare.


    • Version compare additional check is_countable.


    • Classic editor button should exists now.


    • A non well formed numeric value with Custom Font Size unchecked


    • Fix save post for REST API (For Gutenberg).


    • Some broken urls.


    • Site and donate url in class-urvanov-syntax-highlighter-global.php
    • Fix mark in readme.txt
    • “Open Code in New Window” syntax highlighting.


    • [BUG] Languages parsed with errors


    • Theme editor fixed.
    • Crayon themes support.


  • FIXED:
    • Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters
    • Notice: A non well formed numeric value in class-urvanov-syntax-highlighter-formatter
    • Bug report: when add \(*) in codes. It will show {{urvanov-syntax-highlighter-internal:0}}


  • FIXED:
    • Fix invisible button in TinyMCE editor.
    • Fix readme.txt
    • Fix readme.md


  • FIXED:
    • Only bug fixes with crayon inline.


  • ADDED:
    • Refactored to fit WordPress Code Codex.
    • Renamed to Urvanov Syntax Highlighter.
    • PHP 7 support


  • ADDED:
    • Verilog language, thanks to https://github.com/gdevic.
  • FIXED:
    • Moved header() call out of CrayonWP::highlight().
    • Renamed MIXED to ALTERNATE to fix compatibility with PHP7, thanks to https://github.com/edwarddekker.


  • ADDED:
    • CrayonWP::highlight() can return plain text instead of HTML. Used for AJAX requests to prevent
      XSS vulnerabilities.
  • FIXED:
    • Support for tags (e.g. formatting) in the HTML for CrayonWP::highlight(). This affects
      bbPress. Only script tags and event attributes are stripped.


  • FIXED:
    • header() use in CrayonWP::highlight()


  • ADDED:
    • Plain white theme (thanks to http://vhbelvadi.com).


  • ADDED:
    • Coy theme.
  • FIXED:
    • Strip tags in output content for CrayonWP::highlight()


  • ADDED:
    • Qtcreator theme.
    • Norwegian translation.
    • Amity theme.
    • Flat-UI theme.
    • Powershell theme.
    • Mm Dark Blue theme.
    • Prism Like theme.
    • Kaderu theme.
    • Kayote theme.
    • Xcode theme.
    • Source Code Pro font.
  • FIXED:
    • Polish translation and other fixes (thanks to https://github.com/rob006).


  • FIXED:
    • Bug causing sample code to give an error due to new restriction on loading local files.


  • ADDED:
    • Onderka15 theme.
    • Obsidian Light theme.
  • FIXED:
    • Prevented using is_admin() as a security query (thanks to g0blin Research).
    • Removed the ability to load files from the filesystem due to security vulnerabilities (thanks to Kevin Subileau). Ensure all URLs are publicly accessible.
    • Fixed a bug causing tags to be removed in some cases.


  • ADDED:
    • Option to load crayon script in the footer to improve loading performance (thanks to sumhat).
    • X3Info theme
    • Papyrus language
  • FIXED:
    • Support for nested multi-line strings in Swift language (thanks to nicolafiorillo).
    • CrayonFormatter::print_error() called non-statically (thanks to https://github.com/ksubileau)
    • Admin CSS issue: https://github.com/aramk/crayon-syntax-highlighter/issues/250.
    • Table style incompatibility with WP 2015 theme.
    • Wrapped text now breaks per character.


  • ADDED:
    • Setting to disable Crayon for posts older than a given date (thanks to weismannweb).
    • Support for changing the text shown for “Add Code” and “Edit Code” buttons in the Tag Editor.
    • Orange Code theme.
    • Raygun theme.
    • Tamil language.
  • FIXED:
    • Missing PHP keywords thanks to tst.
    • Error with undefined HTTP_USER_AGENT thanks to Enrique Cordero.
    • Removed misused error control operator.
    • HTTPS check for whether to use https://
    • Selection CSS style for plain code.
    • Reserved keywords in Ruby.


  • ADDED:
    • OCaml language thanks to zhenjie
    • Added Capacitacionti theme
  • FIXED:
    • SVN issue with old versions of JS and CSS resources being deployed instead of the latest from the dev repo.


  • ADDED:
    • Traditional Chinese translation (thanks to Arefly)
    • Converting tabs to spaces setting is now off by default. The original tab size setting is used with the tab-size CSS style instead to preserve tabs in the source.
    • “ignore:true” setting in the class of pre tags will prevent that code block from being parsed by Crayon.
    • Obsidian theme thanks to Rakcheev Artem.
    • Visual Assist theme thanks to Brady Reuter.
  • FIXED:
    • Styling for (?) buttons on settings page.


  • ADDED:
    • Persian translation (thanks to MahdiY).
    • C1 language and themes (thanks to Oparin Pavel).
  • FIXED:
    • Improved Chinese translation and Go language statements (thanks to sumhat)
    • Theme editor failing to load.
    • Updated to WP 4.0


  • ADDED:
    • Shell-default theme.
  • FIXED:
    • Added missing SVN files.


  • ADDED:
    • Swift language (thanks to weyhan).
    • Light Abite theme.
    • Missing gettext for in settings page.
    • Finnish translation (thanks to vahalan).
  • FIXED:
    • Issue causing other shortcode tags (e.g. captions) to be removed on post save.
    • Improved tag editor button style when active to use the default for TinyMCE.
    • Style missing for visual editor if switching from text mode after a refresh.
    • String matching fixes thanks to mcmanigle


  • FIXED:
    • Removed commercial links from translations section following advice from WordPress.


  • ADDED:
    • Ukrainian translation.
  • FIXED:
    • Tag Editor compatibility with WordPress 3.9.1.
    • Reduced loading times by lazily loading Tag Editor content, which was parsing all languages to populate the dropdown.
    • Added more debug statements to log issues with loading resources and parsing languages.
    • Removed clear: both and float: none from crayon tag styles.


  • ADDED:
    • Sublime-text theme.
    • PowerShell ISE Theme thanks to ITFiend.
  • FIXED:
    • C# improvements thanks to Meligy
    • Admin uses HTTPS for requests when available (thanks to taoeffect)
    • Tag Editor button failing to function Firefox.
    • Shell language improvements thanks to mixProtocol and ITFiend.


  • ADDED:
    • Delphi Web Script language (thanks to smartmobilestudio).
    • Added Pspad theme.
    • Dark terminal theme (thanks to http://blog.naydenov.net/)
    • Support for user-defined languages in the wp-content/uploads/crayon-syntax-highlighter/langs folder which will remain after upgrades.
    • Korean translation.
  • FIXED:
    • Dutch translation.
    • Compatibility with WordPress 3.9:
    • Tag editor updated to comply with TinyMCE version 4.
    • Admin script failed to load since “wpdialgs-popup” script is no longer available.


  • ADDED:
  • FIXED:
    • Fixed a bug causing posts with only backquotes and no Crayon tags to be ignored.
    • wrap=”off” is now set to wrap=”soft” to adhere to W3C standards.
    • The copy button tooltip.
    • Retina button order in the sprite sheet.
    • Wrapping of code lines in some wordpress themes.
    • Wrapped line height was being overridden by CSS.
    • Settings page docs links.


  • ADDED:
    • Slovenian language
    • Coda Special Board theme
    • Rust language
    • Utilities for converting files containing lines into arrays or regex
  • FIXED:
    • Prevented Google translate from affecting the code.


  • ADDED:
    • Cisco Router theme
    • PL/SQL language thanks to https://github.com/Xophmeister
    • Turnwall theme
    • Iris Vfx theme
    • bncplusplus theme
  • FIXED:
    • Spans are no longer display:inline-block, which can cause spaces to disappear.
    • ObjC improvements thanks to https://github.com/springsup


  • ADDED:
    • Merged two versions of MySQL from different authors into a single language folder
    • VB.net language
  • FIXED:
    • Removed dependency on jQuery.browser.msie in popup script
    • Fixed Colorbox CSS conflicts
    • CSS improvements for Colorbox to prevent unusable controls
    • German translation improvements


  • ADDED:
    • MySQL language
  • FIXED:
    • Replaced Fancybox with Colorbox to comply with GPLv2


  • ADDED:
    • New setting to remove <code> blocks surrounding the code, often not intended to be in the code itself
    • Scala language thanks to https://github.com/vkostyukov
  • FIXED:
    • Most important documentation paths now point to github docs.


  • ADDED:
    • Ada langauge from https://github.com/antiphasis/crayon-lang-ada
    • Monokai theme
    • CG Cookie theme
    • MATLAB language
    • Scala language
  • FIXED:
    • Escaping quotes in strings
    • R language type literals
    • Arabic translation
    • Forced LTR for Crayon CSS, preventing the line numbers from appearing on the right
    • Added unhighlighted colour to theme editor and existing dark themes
    • New theme inputs not present in the loaded theme are added during save
    • Fixed a bug related to IIS 7.5 and uniqid(): https://github.com/aramk/crayon-syntax-highlighter/issues/97


  • ADDED:
    • Mirc Dark theme
    • Feeldesign theme
    • IntelliJ theme
    • Arabic translation
  • FIXED:
    • All language css classes are prefixed with “crayon-” to prevent conflicts
    • Terminal theme fix
    • Improved language readme
    • Lines containing a single zero appeared blank when highlighting was disabled
    • AppleScript regex (thanks to darricktheprogrammer)


  • ADDED:
    • ASP language
    • Added Secrets of Rock theme
    • <code> tags can now be captured as either inline or block Crayons.
  • FIXED:
    • Comments now pass through filters before being checked for Crayons.
    • JavaScript and CSS resources are minified into single files on the front-end to reduce HTTP requests.
    • Toolbar buttons use a sprite sheet, not individual images.
    • bbPress now allows posting Crayons for non-users


  • ADDED:
    • Eclipse theme
    • Background colour for language added to Theme Editor
    • More extendable handling and santisation of settings
  • FIXED:
    • Blog content was being treated as a single code block due to a change in the internal CrayonWP::highlight() method
    • Crayon post management is now refreshed when plugin is activated
    • Terminal theme improvement


  • ADDED:
    • Line height can now be customised along with font size
    • AJAX method for highlighting Crayon using ajaxurl. See http://aramk.com/blog/2012/05/30/adding-crayon-to-posts-in-wordpress-programmatically/.
    • Ability to capture code tags as inline Crayons
    • Terminal theme
  • FIXED:
    • Expanding code issues to do with position and dimensions
    • Toolbar font-size and line height improvements
    • Now settings which affect capturing trigger a refresh of crayon posts when modified
    • Added message about emailing in submit window of theme editor
    • Border is now drawn inside so right border won’t clip from theme CSS
    • Comments were not detected to contain Crayons unless edited in wp-admin
    • Highlighting improvements for variables and entities


  • ADDED:
    • R language
    • TinyMCE is automatically added to the comment box when the Tag Editor is enabled on the frontend
    • SQL Management Studio 2012 Theme
  • FIXED:
    • bbPress Tag Editor button wasn’t showing
    • Slashes are now added to post content before legacy tag conversion, since wp_update_post removes them
    • PowerShell improvements
    • Empty directory path on some pages
    • Expanding uses absolute positioning, so it will stay on top of other elements
    • When expanded the toolbar controls move left for easier toggling
    • CSS conflicts with wordpress themes causing line-height and font-size overrides to be ignored


  • ADDED:
    • Arduino IDE theme thanks to LukaszWiecek (https://wordpress.org/support/topic/arduino-code-support)
    • User Fonts can be added to wp-content/crayon-syntax-highlighter/uploads/fonts/somefont.css
  • FIXED:
    • Issues with resource management, preventing loading of user CSS themes and performing theme editor functions
    • C#, C++ id issues preventing them loading
    • Tag Editor duplicate loading issue prevented close dialog on HTML view
    • Arduino language updates thanks to LukaszWiecek (https://wordpress.org/support/topic/arduino-code-support)


  • ADDED:
    • Arduino language
    • LESS language
    • Sass language
    • Lisp language
    • AmigaDOS language
    • Added CoffeeScript thanks to http://firn.jp/crayon-coffeescript
    • Line numbers right border in theme editor
    • New Themes: Familiar, Idle, Tomorrow, Tomorrow Night, Github, VS2012, VS2012 Black
    • Ability to minimize code
    • Translation to Slovak
  • FIXED:
    • jQuery UI is no longer an external dependency; now using wpdialog(). Theme Editor updated to use wpdialog.
    • Inline tags. See: https://github.com/aramk/crayon-syntax-highlighter/issues/57
    • Tag Editor didn’t work on front end
    • Improved legacy tag conversion functions by removing false positives arising from duplicate regex
    • Slightly faster conversion of legacy by delaying database writes until the end
    • &-quot; is also converted now in HTML
    • Position of color picker top is remembered
    • Minor bug in saving themes causing field name mapping to be ignored.
    • Added missing blank.gif in fancybox
    • MS DOS language fixes
    • Taken measures to prevent incorrect upload directory creating a folder in root.
    • Theme fixes. ‘border’ is now split automatically into separate CSS rules.
    • Monospaced font for Tag Editor
    • “Attempt to load Crayon’s CSS and JavaScript only when needed” setting improvements
    • Logging improvements
    • Unchecked property: Notice: Undefined property: WP_Query::$post
    • Theme Editor PHP classes renamed to avoid conflicts
    • Log uses strval() instead of ob_start() to avoid conflicts with other plugins using ob_start() without ob_end_flush() or similar


  • FIXED:
    • Converting tags failed to work since 2.0.0 – also fixed minor bugs leading to false positives for legacy tags.
    • Copy function was calling invalid function, preventing duplication from taking place.
    • Slashes are removed from server side input which was appearing from the change code dialog


  • ADDED:
    • Ability to change sample code in settings
  • FIXED:
    • Changes in ID definitions caused C++ and C# to fail loading.
    • Fixed issues with minified CSS not loading in popup window
    • Using wp_mkdir_p instead of mkdir for creating directories and such.
    • Admin resource dependencies


  • ADDED:
    • Theme Editor allowing users to create and modify Crayon Themes!
    • Polish translation (thanks to Bartosz Romanowski)
    • Vim language
    • Solarized themes (thanks to Greduan)
    • Converting legacy tags now has an “encode” option. If selected, any legacy tag where the “decode” attribute is missing (neither true or false) has its code encoded and decode=”true” specified.
  • FIXED:
    • Removed fancybox_init.js and integrated into util.js, other minor improvements in loading Tag Editor
    • Improved expanding with shirt
    • Issues with expanding a single line, other minor issues.
    • Merged JS and PHP debugging toggle
    • Moved everything towards camelCase from underscores
    • Minor improvements to Objective-C
    • Numerous bug fixes and improvements!


  • ADDED:
    • Selected text in the TinyMCE editor is now added into the code box of the Tag Editor
    • Retina buttons for the toolbar
    • Support for WordPress 3.5
  • FIXED:
    • Removed fancybox_init.js and integrated into util.js, other minor improvements in loading Tag Editor
    • Disabling popup now removes the JS resource
    • Refactored Tag Editor functions
    • Display Tag Editor settings on the frontend wasn’t working
    • Removed contextual help and added more useful links, including online help
    • Checkboxes have labels instead of spans thanks to https://github.com/toszcze
    • Undefined php variable fix thanks to https://github.com/toszcze
    • Dimension fixes in js on hover
    • On iOS the fonts appeared larger for code than for line numbers.
    • Expanding code shrunk instead if the toolbar was visible
    • Updated Turkish


  • ADDED:
    • Expanding code beyond the page border on mouseover – enable the setting under Settings > Crayon > Code.
    • Expanding the code is delayed in the same way using the toolbar delay setting.
    • French translation
    • Portuguese translation
  • FIXED:
    • Carriage returns and new line characters were being treated differently and not being detected correctly. I’m using a new regex which detects both and also captures the line content: (?:^|(?<=\r\n|\n))[^\r\n]*
    • JS variable bugs when minifying with W3 Total Cache
    • CSS did not load in newly opened code window if minified
    • Saved comments did not capture Crayons until they were updated or the post list was refreshed in settings
    • Posts in settings are sorted now descending based on modified date
    • bbPress posts showed Crayons on the bottom of posts irrespective of their position in the post content.
    • Toggle plain code button appeared when plain code was disabled
    • Updated Turkish translation


  • ADDED:
    • The settings page no longer searches through all posts looking for legacy tags until you hit a new “refresh” button. Refreshing will look through all posts for crayon tags, and also mark any that are legacy tags. The same process occurs on an individual basis when saving a post.
    • The settings page shows which posts contains legacy tags, and the buttons do not hide when showing the table.
    • Added theme information to the settings page
    • Improved version updating
    • Code in a new window loses size constraints
    • MS-DOS batch language (thanks to http://www.amigalog.com/?p=334)
    • Minor improvements
  • FIXED:
    • Fancybox issues have been fixed: http://aramk.com/blog/2012/11/28/initialising-fancybox-with-custom-objects/
    • max/min-height/width didn’t work on Tag Editor
    • Width discrepancy before and after mouseover from 1px border
    • Before and after whitespace didn’t display correctly
    • Code opened in a new window didn’t display if the current wp theme css was included
    • IE 8 compatibility issues
    • Dropdown of languages in settings and Tag Editor are now sorted by name, not id
    • By default “Display the Tag Editor in any TinyMCE instances on the frontend” is disabled to reduce resources
    • Chinese translation updated


  • All AJAX functions are now using the wp_ajax action and admin-ajax.php method defined here: https://codex.wordpress.org/AJAX_in_Plugins. This means Crayon no longer passes around the wp_load path and doesn’t use it as a $_GET variable to load AJAX requests. The security vulnerability in 1.13 is no longer present and that code has been removed.
  • font-size and line-height has been removed from the crayon style CSS and is specified using the settings screen – the custom font size is enabled at 12px. This allows you to disable the custom font size and allow your own CSS to take control of the sizing for you. With the custom size disabled the inherited size is applied, so the code will appear at the size of its parent element based on your wordpress theme.
  • Update functionality has been improved so the CrayonWP update function is only called when an update is detected from a change in the version string, not every time you load the page! If using lower than 1.14 the custom font size setting is enabled for you, since this setting was disabled by default in previous versions.
  • Fixed a bug preventing Tag Editor from showing on the front end (related to the AJAX fix)
  • Moved global js variables to the init functions which are called on ready()
  • Fancybox now uses “fancybox” as the script name and checks if another version is already queued
  • Fixed a bug where post previews were not displaying any Crayon code
  • Fixed an issue with code wrap not reverting when disabled
  • Fixed a bug causing code wrap from distorting the style of the popup
  • Added Erlang thanks to Daniel (adostudio.it)
  • Fixed a bug where languages were parsed too late to pick up language modes
  • Updated German translation.


  • Fixed an bug with file paths on Windows causing false positives for the security checks needed to load AJAX requests; thanks to Andreas Giemza.
  • Fixed a bug in list_posts.php, also thanks to Andreas.
  • Added a more spaced classic theme, mostly for testing at the moment.


  • Added line wrapping.
  • Fixed a bug in converting tags.
  • Fixed a bug preventing Tag Editor from opening in HTML editor.
  • From now on, only the wp-admin will reveal your wordpress install directory.
  • The plain code now wraps based on the toggle setting.
  • Fixed a potential vulnerability when loading components through AJAX and a remote PHP file path is provided. Thanks to Charlie Eriksen via Secunia SVCRP.
  • Spanish updated


  • Fixed a bug with bbPress preventing posts from appearing.


  • Added ability to convert all legacy Crayon tags in blog posts and comments to <pre> tags, retaining all attributes. These are the accepted standard for the Tag Editor and they’re backwards compatible (if Crayon is off or you’re using another highlighter).
  • Added a button in the settings page to display the list of posts with Crayon tags
  • Fixed a bug causing posts with Crayon tags only in the comments (not the post content) to be ignored.
  • Added Go Language
  • Added 4 new fonts suggested by Andrea Lazzarotto
  • Added Ado theme thanks to adostudio.it
  • Superfluous <code> tags wrapping around the code are removed
  • Fixed encoding bug in rss feeds, now takes decode setting into account
  • Fixed mixed highlighting + icon from showing all the time, only shows with mixed language code
  • Fixed a bug introduced in 1.11 that caused the page to scroll up to the top on refresh
  • Updated Spanish and Turkish translations


  • Added bbPress support.
  • Integrated Tag Editor with Fancybox, switched from the discontinued ThickBox, a fair amount of changes took place.
  • Crayon should now appear pretty much anywhere TinyMCE does, and this can be tweaked to add more options later.
  • Added setting to disable Tag Editor on front end, and/or disable its settings.
  • Added the ability to specify line ranges
  • Added Microsoft Registry language thanks to techexplored.com
  • Added MIVA Script language
  • Added Transact-SQL language
  • Added option to add blank lines before and after the code
  • Wrote a neat GeSHi language file scraper, makes it easier to scrape GeSHi files for grouped keywords and add them as Crayon languages
  • Added improved Spanish translation (thanks to Hermann Bravo)


  • Added diff language thanks to omniavin
  • Fixed CSS rule for plain-wrap
  • Added CSS class and white background to popup window
  • Removed noConflict() that was causing jQuery to fail on scripts that used $
  • Fixed an issue in the German translation causing “%gt;” (should be “&”) to be recognised as an argument in printf.
  • The new method for using the wp_load.php path provided through a GET request from Crayon’s js to its PHP should allow redefinitions WP directories in wp_config


  • Added Dutch translation thanks to @chilionsnoek.
  • Added Delphi/Pascal thanks to Chris McClenny (http://squashbrain.com/)
  • Added AppleScript
  • Language is automatically selected from the Tag Editor dropdown as you type a URL with an extension (e.g. typing “cs” would select “C#”)
  • Fixed a preventing language being detected from extension
  • Fixed a bug causing crayon:false to be ignored in the class tag
  • Cleaned up crayon’s js so it’s not possible to overwrite the jQuery instance
  • Fixed bug causing repeats of Crayon due to broken tags from using Mini Tags
  • Fixed isses with ignoring Mini Tags with $
  • Added Italian translation thanks to Federico Bellucci (http://www.federicobellucci.net/)


  • Fixed a bug caused by unescaped HTML elements in the plain code breaking the page markup, reverted to escaped and uses the new sanitisation method.


  • Fixed an issue with IE 8 throwing JS errors for setStyleProperty
  • Fixed yet another issue with \r\n causing incorrect span tags, refactored code.


  • Another fix regarding the \r\n line breaks


  • Fixed a bug caused when ensuring “\r\n” was present in 1.9.8. It was due to using ‘\r\n’ instead of “\r\n”.


  • New API to access Crayon internals
  • Added TeX thanks to http://blog.keyboardplaying.org/2012/06/08/syntax-highlighting-latex/
  • Moved update method into settings page to improve efficiency a bit
  • Fixed an issue causing HTML spaces to appear in plain code
  • Made sure \r\n was present for all line breaks in plain code
  • Fixed minor bugs in settings


  • Fixed a crucial but hard to spot bug causing Crayon code to break by incorrectly handling ignored Crayons
  • Added functions to generate Crayons when given Crayon tags in strings like the post content
  • Added width:100%; so CSS float works
  • Removed bit.ly links from this readme


  • Fixed a bug causing wordpress wp_content path customisations to break the tag editor and live preview
  • Fixed a bug with marked lines using ranges


  • Fixed a bug that prevent Crayons from being captured internally, only affected on certain themes
  • Fixed a bug causing backquotes being changed to code within Crayon code


  • Added /util/external_use.php for an example of how to use Crayon in other PHP environments.
  • Fixed issues with the excerpt, now Crayons are not stripped out by default, can be changed in Settings > Misc.
  • Fixed font-size issues that may conflict on some themes.
  • Crayons in comments now have their HTML entities decoded by default, specify “decode:false” in the class attr or decode=”false” as an attr if you don’t want it to decode.
  • Fixed a newline bug thanks to Eugene at http://iteye.ru/


  • Added Perl
  • Minor bugs fixed thanks to http://hahler.de
  • Fixed bug in js detecting PCs as Macs
  • Fixed IE bug preventing code from opening in a window
  • Fixed bug causing comment <p> tags being removed


  • Fixed an error preventing code containing HTML tags from being added using the Tag Editor in Visual mode
  • Fixed CSS for Mixed Highlighting (+)
  • Added a new theme thanks to http://blog.phiphou.com


  • Added Assembly (x86)
  • Standardised the toolbar buttons, now they use CSS spriting and have the same colour
  • Changed Theme CSS background to avoid conflicts with themes that affect TD tags
  • Fixed bug caused by discrepancies in how checkbox values were handled in Tag Editor
  • Fixed a bug causing $root variable to change on some setups, preventing tag editor from loading


  • This update is the biggest update yet – highly recommended for all users.
  • Added a brand new Tag Editor in the Visual Editor toolbar! Greatly simplifies adding code to posts in the Visual Editor. You can also switch between Visual and HTML modes to verify your code before posting!
  • Added ability to decode HTML entities, so now you can use <, > etc. in the Visual Editor. But if you need indentation etc, you’ll want to use the HTML editor for posts with Crayons. You can also use decode=”yes/no/true/false” to set this for an individual Crayon.
  • Added ability to decode attributes, which is enabled by default to avoid seeing encoded strings in the title, and also to allow encoded angle/square brackets in the title that would otherwise clash with the Crayon tag brackets if left unencoded.
  • Added ability to use the class attribute in <pre> tags for specifying settings like url, mark, lang, toolbar and all other valid settings like in a normal [crayon] tag. This will ensure your <pre> tags remain valid XHTML markup even with Crayon disabled.
  • Added ability to specify hyphen-separated-values in the class attribute of a <pre> tag to make them look like actual class selectors. E.g. <pre class=”lang-objc toolbar-false”>…</pre>. The setting name is made up of letters and hyphens ONLY, the value is whatever is left between the last hyphen and the next whitespace character.
  • Added Scheme language thanks to https://github.com/harry75369
  • Added ABAP language with help from Christian Fein
  • Added a new setting: crayon=”false/no/0″ as an attribute or crayon:false in the class tag of a <pre>. …