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.

[php htmlscript=”true” highlight=”12″]<!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>[/php]

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

[code light=”1″][[php light="true"]your code here[/php]][/code]

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,818 thoughts on “SyntaxHighlighter Evolved

  1. Pingback: 100 WordPress pluginova za vaš sajt | Tehnologija.me

  2. Pingback: Wordpress??????SyntaxHighlighter | Wormcy Blog

  3. Pingback: WordPress blog için gerekli 10 eklenti - Ceviz.Net

  4. Pingback: Wordpress plugin: clipboard copy text - Blogghidee

  5. Pingback: oscardixit | Poner un contador de caracteres máximos en una caja de texto

  6. Pingback: TOP 100 PLUGIN WORDPRESS TERBAIK « norynazis

  7. Pingback: Frühjahrsputz geht in die zweite Runde » Beitrag » Weber-NRW

  8. Pingback: Logic House | 40+ essential WordPress plugins

  9. Pingback: 100????Wordpress?? | MD Blog

  10. Pingback: ???????????????????????Wordpress?????????? | REmake, REtake, REnovate!

  11. Pingback: 20+ Great code highlighter plugins for Wordpress

  12. Pingback: Getting started with a Website using WordPress Part 3 – Plugins | Neal's stuff

  13. Pingback: Phpr.org Wordpress Temas?! | Web Hocas?

  14. Pingback: ??????WordPress????????????dtakamiya's blog | dtakamiya's blog

  15. Pingback: How to manage WordPress Plugins by WordPress Tutorials

  16. Pingback: Daftar Koleksi 100 Plugins WordPress Terbaik untuk Website Anda | "welcome in 10 e acces"

  17. Pingback: WordPress Plugin Releases for 2/27 « Weblog Tools Collection

  18. Pingback: WordPress Plugin Releases for 2/27 | WP Wordpress Hosting

  19. Pingback: WordPress Plugin Releases for 2/27 | iwebspider design and consulting

  20. Pingback: WordPress Plugin Releases for 2/27 | Lunarium Design

  21. Pingback: WordPress Plugin Releases for 2/27 | High Cross Digital

  22. Pingback: Moving a lot of knowledge | A lot to learn . net

  23. Pingback: WordPress Plugin Releases for 3/4 « Weblog Tools Collection

  24. Pingback: WordPress Plugin Releases for 3/4 | Lunarium Design

  25. Pingback: WordPress Plugin Releases for 3/4 | iwebspider design and consulting

  26. Pingback: WordPress Plugin Releases for 2/27 | Start a Web Design Company

  27. Pingback: WordPress Plugin Releases for 3/4 | WP Jazz

  28. Pingback: WordPress Plugin Releases for 3/4 | High Cross Digital

  29. Pingback: ?????????????????????SyntaxHighlighter Evolved | ONLINE

  30. Pingback: WordPress Plugins List

  31. Pingback: WordPress blog için gerekli 10 eklenti | Webtroloji

  32. Pingback: Plugins Esenciales de WordPress | IntegralTech

  33. Pingback: Changes Over The Last 3 Months | Clandestine Laboratories

  34. So I’m loving the addin, but can’t figure out how to get it to work properly. I’m self-hosting WP 3.5.1 with the Responsive theme and SyntaxHighlighter, and am posting VB code samples (for instance http://www.i-teach.nl/site/uncategorized/test-code-sample/). The code sample box and the line numbers appear, the font is monospaced, but the color-coded syntax I see in all the (HTML/PHP) examples doesn’t appear; all my code remains stubbornly black. Is it something I did, or does VBA not color-code the syntax?

  35. Pingback: Mathew Cropper - SITE UPDATES: SPRINT 2

  36. Pingback: ??????WordPress????????????d.takamiya's blog | d.takamiya's blog

  37. Pingback: WordPress??????SyntaxHighlighter?????? | ????

  38. Pingback: 40+ essential WordPress plugins

  39. Pingback: Strange problems when I try to insert HTMLXML code snippet in my posts | Question and Answer

  40. Pingback: Important Security Update For SyntaxHighlighter Evolved | Viper007Bond.com

  41. Hi, I had an issue with your plugin (no more highlighting) and I found this answer on WP support forum that solved my problem, do you know why this bug is still there? (The post was 10 months ago):

    *****The post that solved my issue on WP support forum*****

    The highlighter CSS files are not loading because of a JavaScript error.

    I fixed it by editing syntaxhighlighter.php (v3.1.3):

    change line 634 from this:

    document.getElementsByTagName(“head”)[0].insertBefore( corecss, document.getElementById(“syntaxhighlighteranchor”) );

    to this:

    document.getElementById(“syntaxhighlighteranchor”).appendChild(corecss);

    and uncomment line 648 and delete line 649 so that you are left with only this:

    document.getElementById(“syntaxhighlighteranchor”).appendChild(themecss);

    Thanks in advance!

    • Oh…. I saw that Floris Kleijne has also the Responsive Theme.

      My config is:

      WP 3.5.1
      Responsive Theme 1.9.3.1
      SyntaxHighlighter Evolved 3.1.6

      Running on self-hosted Gentoo VM.

      • Thanks for the tip, Nicolas! I made the changes as you posted them; sadly, it doesn’t make any difference. In fact, I’m now discovering that the color-coding doesn’t works on any language (tried php, vb) or under any theme (tried Bombay, Citrus Mix; all code shows up black; under Bombay, vb even disappears entirely; under Citrus Mix, no box even).

  42. Hi, Im using your plugin on my wordpress site and find that the tags are displayed as well.
    I found out that I need to define stripBrs to true (as stated on http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/) and did so using the following:
    [bash stripbrs=”true”][/bash] or [code language=”bash” stripbrs=”true”][/code].

    This did not work as expected. Could you please advice me on how to “fix” this issue?

    Extra info:
    WordPress 3.5.1.
    SyntaxHighlighter Evolved Version 3.1.6

    Many thanks in advance.

  43. Pingback: Làm ??p code trong blog v?i SyntaxHighlighter - Th? Thu?t Wordpress

  44. Thanks a lot. makes my work so much easire. But there is a lot of stuff in the comments here. You should Separate pingbacks, replies and comments with tabs if possible.

  45. Pingback: Xceptance Blog » Blog Archiv » Blog Performance – We Kicked it up a Notch

Comments are closed.