This plugin is developed by thislab and is available from wordpress for download.After extracting the folder into your wordpress plugins directory just activate from the plugin menu.
SyntaxHighlighter Plus is a WordPress plugin for code syntax highlighting. It is an enhanced version of the original SyntaxHighlighter by Matt, Viper007Bond and mdawaffe. Please give them a big applause for making such a great plugin!
SyntaxHighlighter allows you to easily post syntax highlighted code all without loosing it’s formatting or making an manual changes.
It supports the following languages (the alias for use in the post is listed next to the name):
- Bash —
bash,sh - C++ —
cpp,c,c++ - C# —
c#,c-sharp,csharp - CSS —
css - Delphi —
delphi,pascal - Java —
java - JavaScript —
js,jscript,javascript - PHP —
php - Python —
py,python - Ruby —
rb,ruby,rails,ror - SQL —
sql - VB —
vb,vb.net - XML/HTML —
xml,html,xhtml,xslt
Example.
[css].dp-highlighter
{
font-family: "Consolas", "Courier New", Courier, mono;
font-size: 12px;
background-color: #E7E5DC;
width: 530px;
margin: 18px 0 18px 0;
padding-top: 1px;/* adds a little border on top when controls are hidden */
overflow: auto;
/* fixes for IE: "overflow: auto" causes unnecessary vertical bar */
/* corrects bottom scroll bar overlapping */
overflow-y: hidden;
padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 15 : 0);
}
[/css]
