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: WordPress???????SyntaxHighlighter Evolved | ??

  2. Pingback: init() | Random Segments of Code

  3. Pingback: Incrustar “gists” de github en WordPress | Tecnologia, Desarrollo Web, Posicionamiento Web SEO

  4. When I use the title=”” attribute, it is mangled after I click Save. An example:

    [vb title="Endless program written in BASIC"][/vb]

    Comes out as

    [vb title="Endless 1=in 2=BASIC"][/vb]

    Any ideas?

  5. Pingback: andAsk??????????????????????????? | andAsk.net

  6. Pingback: Tuszynek » Innowacje dla ??dnych mody

  7. Pingback: wordpress??????? | IT????_itblood.com

  8. Pingback: The Top 100 WordPress Plugins For Your Site | Free WordPress Tutorials Site

  9. Pingback: SyntaxHighlighter Evolved – ?????????? | ???

  10. Pingback: Google Syntax Highlighter: Wordpress TinyMCE strips out HTML tags and attributes as Author | rob mills

  11. Pingback: Blog Basics » Mike's Research Blog

  12. Its a nice work,many many thanks.But I think it has one issue,a suicidal daring act.Putting dangerous code with encoding html entities.And let the plugin do automatic formatting.

    Say if some how this plugin ceased to work,or in future it might not supported by wordpress,or you might to move on a better option-but all the codes are published without formatting.

    My question is how to disable this auto formatting that is html entities encoding,I like to publish encode code myself. Again thanks for this great work.

  13. Hello, can you tell me how best to hardcode this into a theme? I’ve tried using (checked ‘load all brushes’) along with several others with no success.

    Thank you!

  14. Pingback: Essential Plugins for Wordpress Blog : Codefap.com

  15. Pingback: 10 Essential Wordpress Plugins : Codefap.com

  16. Pingback: Hello World – Syntax Highlighter in Wordpress | HunterGerlach.com

  17. Pingback: Los Mejores Plugins de WordPress para Tu Sitio Web (2a parte) | Blog Diseño Web

  18. Pingback: highlight.js – Syntax Highlighting in Wordpress ohne Plugin | Mario Fink

  19. Hello, I’ve installed the plugin but it doesn’t work on my current theme and I couldn’t find out the reason. Can you please help me on it?!

  20. Nice plugin, I’ve been using it for a while on wordpress.com. When I use it on wordpress.org, the lines are never wrapped though. What can I do to wrap them? This is my tag, for instance:
    [sourcecode language=”text” light=”true”][/sourcecode]

  21. Pingback: wordpress??????SyntaxHighlighter Evolved | Jack Blog

  22. Pingback: Wordpress ?çin Gerekli Eklentiler | Ali Ayaz

  23. Hi Viper, do you know how I can add padding to the left of the code box, because when I’m not using line numbers there’s no padding at all, and it looks strange! See http://www.luigip.com/?p=82

    I’ve changed some of the attributes in the cssCore.css file (which is how I got the inset shadow and rounded corners), but adding padding in the `.syntaxhighlighter textarea {` section puts padding around all elements, in the middle of the code. (Editing the cssCoreDefault.css file doesn’t seem to do anything at all.) Any ideas?

    (BTW you might like to try the Akismet plugin to stop all the spam comments here. It works for me!)

    • You’re kind of on your own for customizing it — I didn’t write the highlighter and don’t know the CSS that well.

      As for Akismet, I’m already running that. No spam comments here, although some of the pingbacks might be sketchy. Many are also legitimate though.

  24. Pingback: INFERLab Site

  25. Pingback: Página Web del INFER Lab

  26. Pingback: Nos actualizamos | Mis Cososas

  27. Pingback: SyntaxHighlighter — ????????? ???? ?? WP | Udobnosti.ru

  28. Pingback: ???? » wordpress ????

  29. Pingback: Posting Source Code di WordPress | aryadkp

  30. Pingback: WordPress blog için gerekli 10 eklenti | Sekizncihayat Blog | Freelance Yaz?l?m Hizmetleri

  31. Pingback: O muzyce i O Wszystkim » Japan Stylenowoczesny trend w modzie kobiecej

  32. Pingback: Infinite Scroll and SyntaxHighlighter Evolved | Matt Shelton

  33. Pingback: ???????????? | R*d@weblog

  34. Pingback: En Popüler Wordpress Eklentileri ve WordPress Eklenti Yükleme | Dünya'dan Ve Türkiye'den 10 Haberleri

  35. I just installed the very latest WP 3.4.1, brand-new install. Having trouble with SHE, though. If I publish a new post with [cpp][/cpp], it just discards everything between shortcodes and leaves the shortcodes there.

  36. Pingback: First Wordpress Plugin: wp-markdown-syntaxhighlighter | Matt Shelton

  37. Pingback: Perl Test-Driven Development: Set Up Your Test Environment | The Strong Family Association of America, Inc.

  38. Pingback: ????????? | ??????

  39. Pingback: Perl Test-Driven Development: Set Up Your Test Environment | Genealogy Webmaster's Journal

  40. Pingback: Infinite Scroll and SyntaxHighlighter Evolved | Matt Shelton

  41. Pingback: First Wordpress Plugin: wp-markdown-syntaxhighlighter | Matt Shelton

  42. Pingback: ????????????????????????WordPress?????10? | kwLog

  43. Pingback: WP-Markdown-SyntaxHighlighter - India IT Directory Top Software Development Companies in India

  44. Pingback: WordPress SyntaxHighlighter Evolved ??????????????? - ????

  45. Pingback: ?????????????????|SyntaxHighlighter Evolved | MNT

  46. Pingback: [Wordpress]TekTea’s Blog????????SyntaxHighlighter Evolved | TekTea's Blog

Comments are closed.