SyntaxHighlighter Evolved

Description:

As seen on WordPress.com.

SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without having to escape the code or anything. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev to do the highlighting and supports all of the package’s parameters via shortcode attributes.

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

Example Code Output:

Note that there are various different color schemes available.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>PHP Code Example</title>
</head>
<body>
	<h1>PHP Code Example</h1>

	<p><?php echo 'Hello World!'; ?></p>

	<p>This line is highlighted.</p>

	<div class="foobar">
		This	is	an
		example	of	smart
		tabs.
	</div>

	<p><a href="http://wordpress.org/">WordPress</a></p>
</body>
</html>

If you prefer, you can hide the line numbering and other UI stuff with the “light” mode, for example:

[php light="true"]your code here[/php]

There are many other parameters and defaults you can control via the Settings page or the shortcode parameters. Full details and instructions are located at the bottom of the Settings page.

Download:

GitHub:

This plugin is available on GitHub. Issues, patches, and pull requests are welcome.

https://github.com/Viper007Bond/syntaxhighlighter

1,816 thoughts on “SyntaxHighlighter Evolved

  1. Pingback: El Top 100 de los Plugins de WordPress para su Sitio | Eduarea's Blog

  2. Pingback: Code in WordPress (SyntaxHighlighter Evolved) | Daniels Blog

  3. Pingback: Show jQuery Source Code In Your WordPress Blog | jQuery4U | No.1 Resource for jQuery Developers

  4. Pingback: Làm ??p code trong blog v?i SyntaxHighlighter | Backtrack - Pentesting - MMO - CEH - SEO

  5. Pingback: Using Custom Theme with SyntaxHighlighter Evolved | Biboroku

  6. I’ve just updated WordPress and this pug-in after having them installed for a very long time without updates. Now all quotes and amps are getting converted to ampersand character codes but doubled. so in my code on the page there are tons of quote, amp, gt and lt codes showing. I feel like I fixed this before by editing something in the plug-in or maybe in a WordPress file. can you please point me in the right direction. Thanks.

  7. Pingback: Cómo añadir código embebido dentro de nuestros post en WordPress | INFOTIPS

  8. I am using WP 3.9 + Jetpack Markdown (2.9.3) + your Syntax Highlighting Evolved. Mostly great, but:

    If my listings contain ‘greater’ or ‘lesser’ or ‘ampersand’ or ‘double quotation mark’, Markdown recodes them to HTML entities like _gt_, _ls_ etc. Without your plugin, code is still shown correct. But with your plugin, the listings contain _gt_ etc. instead of ‘greater’.

    Don’t know who is to blame. Any ideas how to resolve this? Thank you!

  9. Pingback: Wordpress Plugins I can't live without - By Mike Hudson

  10. Pingback: WordPress??????SyntaxHighlighter?????? | ????

  11. Hi Alex,
    thanks a lot for creating the plugin! I was just wondering, is there any way I can add a custom css template? If yes, how can I do it?

  12. Alex,

    If we are also using the Speed Booster Pack plugin, setting Defer parsing of javascript files seems to break your plugin. I tried other plugins that ‘Defer parsing of javascript files’ and the same issue occurred.

    I would love an update that worked with ‘Defer parsing of javascript files’ enabled.

    Looks like when the javascript goes to run, I get this error in chrome:

    Uncaught ReferenceError: SyntaxHighlighter is not defined

    Later,

    Jared

  13. HI THERE! I’m using your plug in and it seems to work fine except after i update the page a coupe of times (without editing anthing in the edit page, it starts changing characters. for example: ” for &quot. do you know how can i prevent this? i’m using csharp

    thanks!

  14. Pingback: WordPress Plugintipp – SyntaxHighlighter Evolved | just4testing.com

  15. Pingback: The Top 100 WordPress Plugins For Your Site | HumanART

  16. Pingback: Ciseco - Posting code with brushes

  17. Pingback: ????????? | bassen_blog

  18. I’d love to see this plugin work if using the “Delay JavaScript” feature of the “Speed Booster Pack” plugin. Currently, I have Speed Booster Pack enabled, but I had to disable the “Delay JavaScript” feature.

  19. Pingback: ?? Markdown ?? WordPress ?? | ????

  20. Pingback: WordPress ? GitHub Gist ? Swift | MUSHIKAGO APPS MEMO

  21. Pingback: [M] 2012??! ???????????WordPress?????52? | mbdb (????)

  22. Pingback: ?? Markdown ?? WordPress ?? | ????

  23. Pingback: Wordpress Temas? | Demirpençe

  24. Pingback: ??????? WordPress 2014 - ??????? | ???? ???????? ?????? | ???? ???????? ??????

  25. Pingback: Nice plugin for displaying code snippets in Wordpress |

  26. Hi! I was curious if there any known issues with getting themes to work in WordPress.org (latest release). I’m able to insert code snippets, but I cannot seem to get any of the themes that I change in settings to take effect. I scouted the web for a few days but didn’t see any similar questions raised anywhere about this. The plugins all appear to have been installed correctly as no errors were reported. Any ideas? Thanks!

  27. Pingback: Building a WordPress site in AWS | Fix Computer

  28. Pingback: Web Programming Blog

  29. Pingback: ??????????????????????SyntaxHighlighter Evolved? | WEB KAY NOTEBOOK

  30. Pingback: Kizz MyAnthia » Blog Archive » SyntaxHighliter test

  31. Hi all

    please, someone can tell me how to prevent the loading of the style file on the home page?

    &lt;style type=&quot;text/css&quot; id=&quot;syntaxhighlighteranchor&quot;&gt;&lt;/style&gt;

    thanks

    • There is no reason to remove it. It doesn’t do anything. It is there so that my JavaScript can add CSS after it but it only does that if you use one of my plugin’s shortcodes on that page. There isn’t a good way to determine if you are going to do that in the header which is why I use JavaScript in the footer to add the CSS.

  32. Pingback: Le guid de meilleurs plugins pour Wordpress

  33. Hi Alex

    I’ve been running this plugin on my local but I cannot render the themes / css and the numbering..

    What is wrong?

    The preview on admin area is working but in the page it is not.. It only shows the simple contents.
    I already add on footer.

    thanks
    Aries

  34. Pingback: ????????? ???? — ?????? SyntaxHighlighter Evolved | vseowebe

  35. Pingback: textarea??????????????????p??????????? | wordpress??????

  36. Pingback: Nützliche WordPress Plugins – Teil 2 | PabstWP

  37. Is there any way to configure the plugin so that it loads when the page loads and not after the page loads? When I load a page with code on it… the code comes in regular text and then after the page loads it changes to the formatted text. Is there a way to configure this?

Leave a Reply