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:
- Download from WordPress.org (0 downloads)
GitHub:
This plugin is available on GitHub. Issues, patches, and pull requests are welcome.
Pingback: ???????????????????????? | ???????webnohito
Hello Alex, I have a problem with the plugin SyntaxHighlighter Evolved. I updated WP to 3.4.2 along with other plugins, and suddenly I SyntaxHighlighter more color code. There are conflicts with some plugins?
at this link you can see the error:
http://www.laboratoriocss.it/eliminare-lo-spazio-tra-gli-elementi-in-display-inline-block.html
Thank you.
Hello there, I am using SyntaxHighlighter Evolved on my buddypress website (http://www.geekclass.it) and i have made some changes in the code to make it bbpress-compatible, so now it works on bbpress forums and group forums in buddypress (if interested in these changes ask via email to info@geekclass.it or look here https://gist.github.com/3768678 in filters in function __construct()).
Anyway, actually I have an issue that i can’t fix: SyntaxHighlighter Evolved changes double quotes and other symbols with their html codes like "es and > and so on in both bbpress forum and buddypress groups forum but, strangely, not in post and comments…I am still trying to subscribe to WordPress Codex to ask there but i can’t (don’t know why). Can i find help here? Thank you very much.
Pingback: Fortran Brush for SyntaxHighlighter Evolved :: Jonathan Landrum
Pingback: Code im Blog | Digitales Umfeld
Pingback: Wordpress??????SyntaxHighlighter?????? | "???"???
is there any way, how i can run it on my web for all WITHOUT loading all brushes? I got from previous CMS the standard syntax of this highlighter:
[php][/php] something [php][/php]
so i would like to load PHP brushes when needed, css brushes when needed etc.
My plugin already does that. It only loads the brushes you actually used.
ups, the code i wrote disapears. I mean:
i got from previous CMS this code
[pre class=”brush: php”] some code [/pre] (replace [pre] with standard pre tag). So i would like to apple highlighter automaticaly on those pre tags with proper brush class
How can I display the code with tag [c][/c]?
for example this code:
[cpp]
counter[c]++;
[/cpp]
It will display as
counter1++;
the tag [php][/php] also has this problem.
[cpp]
counter[php]++;
[/cpp]
also will become
counter1++;
the first one will be used in many code… could you tell me how to solve this problem?
It’s in Version 3.1.3
I am so sorry that it should be
“How can I display the code with tag [ c ] ?”
“the tag [ php ] also has this problem.”
(erase the space)
Use shortcode encapsulation.
Add an extra pair of square brackets around the existing square brackets.
So “[php][/php]” becomes “[[php]]”.
Urrgh … So “[ php ]” becomes “[[php]]”. (erase the spaces)
I noticed a validation issue with the plugin that appears in your site as well.
Error Line 66, Column 87: Bad value syntaxhighlighter-version for attribute name on element meta: Keyword syntaxhighlighter-version is not registered.
…d=”syntaxhighlighteranchor” name=”syntaxhighlighter-version” content=”3.1.3″ />
My guess is that it is the content tag and the error massage is just unclear in the validator
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.viper007bond.com%2Fwordpress-plugins%2Fsyntaxhighlighter%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
Pingback: Lista top 100 wordpress dodataka | X-Te.Me - Tehnologija - IT Portal
Hi
I am getting issue..
I use SyntaxHighlighter Evolved.. and use below way to format code:-
[sourcecode language=”csharp”]
[/sourcecode]
Or
[code lang=”csharp”]
[/code]
Issue:-
It insert unwanted span tag in code in IE 8.0 browser, it works in chrome and Firefox.
Could you please help me?
Url: http://sharepoint.infoyen.com/2012/06/16/custom-timer-job-in-sharepoint/
Thanks!
Avinash
byinfoyen@gmail.com
i use like this
[sourcecode language=”csharp”]
"[sourcecode language="csharp"]
your code here
[/sourcecode]”
[/sourcecode]
Pingback: DynStatic – Wordpress RouterOS Syntax Highlighting
Pingback: Plugins útiles para Wordpress « Un informático en el iC1
Pingback: ???????html?php??????????????????????SyntaxHighlighter Evolved? | ??????
Pingback: Plugin para mostrar códigos fuente en Wordpress
Pingback: Code Blogueur » Des Plugins pour Wordpress
Pingback: Blogging with Org Mode and org2blog | Serious Awesomeness
Pingback: ???? – wordpress???10???
Pingback: Sub capot? - breakfix.ro
Pingback: Wordpress ??100 plugins | ????
Pingback: ??? ?????? ????? ????????? ???? 2012 | ???? ????? ??????
Pingback: El Top 100 mejores plugins para WordPress | Blog de Hosting WordPress
Pingback: Plugins jag använder på den här webbplatsen - Johan Ahlbäck
Pingback: WordPress DIY | ?????' Page
Hi guys,
Its being 1month. I am still getting same issue..
I use SyntaxHighlighter Evolved.. and use below way to format code:-
[sourcecode language=”html”]
[sourcecode language="csharp"]
[/sourcecode]
[/sourcecode]
Issue:-
It insert unwanted span tag in code in IE 8.0 browser, it works in chrome and Firefox.
Could you please help me?
Url: http://sharepoint.infoyen.com/2012/06/16/custom-timer-job-in-sharepoint/
Thanks!
Avinash
byinfoyen@gmail.com
Pingback: ?????-??- » ????pulgin
Pingback: SyntaxHighlighter Bash Edits | Seth Miller dot org
Pingback: 40+ essential WordPress plugins | Webdesigner Depot
Pingback: 40+ essential WordPress plugins : Coders lab
Pingback: 40+ essential WordPress plugins | AsterHost
Pingback: 40+ essential WordPress plugins | 4 Web Design
Pingback: 40+ essential WordPress plugins | Blue Sparrow Media
Pingback: Transforme Communications | 40+ essential WordPress plugins
Pingback: 40+ essential WordPress plugins | High Cross Digital
Pingback: Patelot Graphic 27+ Best Wordpress Plugins to Highlight Code - Patelot Graphic
Pingback: 27+ Best Wordpress Plugins to Highlight Code - Patelot Graphic
Pingback: 40+ essential WordPress plugins Titolab
Pingback: ?????? » ??????Wordpress?????44????
Pingback: Every Tutorials | Tutorials about… everything
Pingback: ??????WordPress?????44????
Pingback: weDesign SA – 40+ essential WordPress plugins
Pingback: 40+ essential WordPress plugins | VCDMA
Hello, Alex! There is Russian translation for SyntaxHighlighter Evolved: http://zalil.ru/34095727
Pingback: Adding syntax highlighter to Wordpress | Temp3.net Web Design
Thanks ,Because i was searching such kinds of plugin’s for my blog.
Pingback: Don’t eat yellow snow. | Nachtlog
I’ve been using this for a while. I removed all my posts because of spam and just recently re-published them. For some reason now it’s taking all of my quotes and changing the to html. "e; etc… wth?
Cancel that. 🙂 It works. Just something with that one post.. not sure what it was, fixed it though. Nice plug in. Thanks!
Perfect, just what I was looking for…
Pingback: phpr.org WordPress temas?!
Pingback: Migracja z BlogEngine.NET do WordPress | Maciej Aniserowicz o programowaniu