💦 FULL SET: Plugins/syntaxhighlighter - Uncensored 2025

SyntaxHighlighter Evolved

Description

Now with support for the new block editor in WordPress 5.0!

SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without losing its formatting or making any manual changes. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev.

For a live demo, see this plugin’s home page.

For a list of supported languages (most widely used languages are supported), see the WordPress.com support document.

Development of this plugin is on GitHub.
Translation of the plugin into different languages is on the translation page.

As seen on WordPress.com.

Screenshots

  • Example display of some PHP code.
  • An example use of the editor block.

Blocks

This plugin provides 1 block.

  • Code

FAQ

The code is just being displayed raw. It isn’t being converted into a code box or anything. What’s wrong?

Make sure your theme’s footer.php file has <?php wp_footer(); ?> somewhere inside of it, otherwise the plugin won’t be able to do its thing.

Highlighting doesn’t work and my browser hangs, why?

Try excluding this plugin’s JavaScript from any performance optimisations your site may be doing that involve minifying or concatenating JS.

Reviews

April 1, 2024
Thank you for this plugin. It works perfect for pure C and C#, but unfortunately, it doesn’t highlight most code for the Unity game engine: C# scripts and Shaders. Please add support for this.
January 4, 2024 1 reply
не работает. строки php просто закомментирует, в визуальном редакторе не отображается
January 20, 2023 3 replies
It works and show code beautifully on pages, But if you copied that code and want to use it, the it shows errors, Looks like it add some spaces, I tried it with php shorcode, and when i copied the code from the frontend of the page, It gives Parse error: syntax error, unexpected…
Read all 87 reviews

Contributors & Developers

“SyntaxHighlighter Evolved” is open source software. The following people have contributed to this plugin.

Contributors

“SyntaxHighlighter Evolved” has been translated into 17 locales. Thank you to the translators for their contributions.

Translate “SyntaxHighlighter Evolved” into your language.

Interested in development?

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

Changelog

Version 3.7.2

  • Add more explicit license information #266
  • Fix escaping when language is unknown #283

Version 3.7.1

  • Ensure box sizing accounts for added padding #278

Version 3.7.0

  • Update translations with translator comment to a single line. #245
  • Fix nested shortcode bugs. #261
  • PHP 8 Compat: declare class properties. #265
  • Migrate project to wp-scripts and fix lodash deps. #269

Version 3.6.2

  • New: Add syntax highlight for Swift. #232

Version 3.6.1

  • New: Set code block language when pasting into editor. #215
  • New: Add syntax highlight for Haskell. #210
  • New: Display the list of available brushes. #221
  • Fix: Line alignment for bootstrap themes. #222
  • Fix: Add space around code. #223
  • Fix: XML brush – use the last occurrence of the tag. #225

Version 3.6.0

  • New: Add “`language shortcut. #180
  • New: Add block alignment support. #179
  • New: Add language selector to block toolbar. #172
  • Fix: transform issue. #201
  • Fix: toolbar code selection for latest Gutenberg versions #200
  • Fix: Content attribute selector. #178
  • Fix: Escaping for shortcodes and URLs. #177
  • Fix: Escaping issues with HTML entities. #160
  • Fix: MatLab brush key in brush map. #188
  • Fix: Remove wrapper. #163
  • Fix: escaping for non-admin authored posts. #187
  • Tweak: Bump “tested up to” version. #183
  • Tweak: Refactor block JS code. #171
  • Tweak: Update plugin tags. #181
  • Tweak: Use tab size from plugin settings in block editor. #174

Version 3.5.5

  • Allow setting text to include br and code tags. #144
  • Add Arduino Brush. #136
  • Fix tags issue while alternating visual and text mode in the classic editor. #139
  • Fix adding classname when using SyntaxHighlighter block. #138

Version 3.5.4

  • Add missing shBrushYaml file.

Version 3.5.3

  • Add “edit mode on double click” option to settings, shortcode parameters and block editor. #126
  • Add YAML highlighter. #129
  • Update plugin dependencies to the latest version. #132

Version 3.5.2

  • Update plugin dependencies to the latest version.

Version 3.5.1

  • Fix stored XSS by tightening up the autolinking code so it only does http/https text. #1
  • Add more CSS keywords and values. #6
  • Fork GH repository: https://github.com/Automattic/syntaxhighlighter/

Version 3.5.0

  • Block: Add a bunch of display settings.
  • Block: Switch to server-side rendering so that the same code that renders the shortcode will render the block.

Version 3.4.2

  • Blocks: Support SyntaxHighlighter block being used as a reusable block.

Version 3.4.1

  • Bring back support for the Gutenberg plugin for the people that are still on older versions of WordPress (pre-5.0) and are using the new block editor via the Gutenberg plugin.

Version 3.4.0

  • Drop support for the Gutenberg plugin in favour of WordPress 5.0’s native functionality (different function names).

Version 3.3.2

  • Gutenberg: If a language isn’t selected in the block configuration, default to plain text.

Version 3.3.1

  • Make sure wp-editor script is loaded for Gutenberg.

Version 3.3.0

  • Gutenberg block thanks to @iandunn.
  • Add a few extra keywords to the JavaScript highlighter. Props @caitp.

Version 3.2.1

  • Fix shortcode issues that would occur during post editing if the code contained what looked like opening HTML tags such as <?php. See this forum thread for details.

Version 3.2.0

  • Don’t parse shortcodes inside of HTML entities, which could result in broken HTML.
  • Drop PHP4 support. This should result in PHP7 support.

Version 3.1.13

  • Fix setting sanitisation bug. Props Alexander Concha (@xknown).
  • Don’t encode shortcode contents on (un)trash. Props Andrew Ozz (@azaozz).

Version 3.1.12

  • Updated editor JavaScript for WordPress 4.3. Props Andrew Ozz (@azaozz).

Version 3.1.11

  • SyntaxHighlighter 3.x: Fix table layout issue. Props jeherve.
  • Fix sanitisation bug for “classname” parameter.
  • Fix a bug that prevented highlighting a range of lines, such as “5-10”.

Version 3.1.10

  • New version of SyntaxHighlighter 3.x library to address XSS security issue. Props Ben Bidner for finding the bug and Alex Gorbatchev working with us (Automattic) to patch the issue.
  • Compatibility with moving the plugins folder to a location other than the default one.
  • Updated Japanese translation file thanks to Daisuke Takahashi.

Version 3.1.9

  • Reset box-shadow property for better theme support. Props Michael Fields.
  • Crush images for smaller filesizes.

Version 3.1.8

  • TinyMCE 4.x compatibility. Props azaozz.
  • Added German translation thanks to Michael Berger.

Version 3.1.7

  • XHTML validation fix by adding type attribute to <style> tag. Props NoMad1337.

Version 3.1.6

  • Kill off v2 copy-to-clipboard SWF file due to XSS security issue with the file. If you want to be able to copy/paste, use the better v3.
  • Switch from using a <meta> tag to a <style> tag as the JavaScript anchor in the <head>. This should fix the validation error under HTML5.
  • Remove an old forced font-size function — it wasn’t actually used.
  • Remove references.

Version 3.1.5

  • The slashing changes made in WordPress 3.6 (alpha) have been reverted — we’re back to the old way again. This release restores the code back to Syntaxhighlighter v3.1.3. See ticket #21767.

Version 3.1.4

  • WordPress 3.6 (alpha) compatibility. Content is now being stripped of slashes before being run through filters so this plugin needs to stop trying to strip slashes and then adding them back. See ticket #21767.

Version 3.1.3

  • Hide vertical overflow so that a vertical scrollbar doesn’t show up in Chrome. Props Caio Proiete. Bump SH script version to bust browser caches.
  • Allow the plugin’s shortcodes to be escaped using double brackets like so: [[code]Foobar[/code]]. This is a core feature, but calling do_shortcode() on the content as it went into the database caused the extra brackets to be stripped.

Version 3.1.2

  • Register some placeholder shortcodes so that strip_shortcodes() and such work properly. Previously the shortcodes were only registered during the brief moment that they were processed by one of this plugin’s filters.
  • Add a notranslate CSS class to the <pre> output so that Google won’t attempt to translate it. Props Otto.
  • Run the CSS classes aka SyntaxHighlighter script parameters through a filter.

Version 3.1.1

  • Fix default title setting not working.
  • Force <code> to be inline. Fixes issues with themes that do code { display: block; }.
  • Added Japanese translation thanks to