7 Plugin SyntaxHighlighter Code WordPress

Author: | Posted in Test No comments

1. SyntaxHighlighter Evolved


SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without losing it’s formatting or making any manual changes. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev. To accomplish the above, just wrap your code in these tags:

[code language="css"]
your code here

The language (or lang) parameter controls how the code is syntax highlighted. The following languages are supported:

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

If the language parameter is not set, it will default to “text” (no syntax highlighting). Code in between the source code tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything.

Configuration Parameters

The shortcodes also accept a variety of configuration parameters that you may use to customize the output. All are completely optional.

  • autolinks (true/false) — Makes all URLs in your posted code clickable. Defaults to true.
  • collapse (true/false) — If true, the code box will be collapsed when the page loads, requiring the visitor to click to expand it. Good for large code posts. Defaults to false.
  • firstline (number) — Use this to change what number the line numbering starts at. It defaults to 1.
  • gutter (true/false) — If false, the line numbering on the left side will be hidden. Defaults to true.
  • highlight (comma-seperated list of numbers) — You can list the line numbers you want to be highlighted. For example “4,7,19″.
  • htmlscript (true/false) — If true, any HTML/XML in your code will be highlighted. This is useful when you are mixing code into HTML, such as PHP inside of HTML. Defaults to false and will only work with certain code languages.
  • light (true/false) — If true, the gutter (line numbering) and toolbar (see below) will be hidden. This is helpful when posting only one or two lines of code. Defaults to false.
  • padlinenumbers (true/false/integer) — Allows you to control the line number padding. true will result in automatic padding, false will result in no padding, and entering a number will force a specific amount of padding.
  • title (string) — Set a label for your code block. Can be useful when combined with thecollapse parameter.

[button href="http://wordpress.org/plugins/syntaxhighlighter/" size="medium" target="_blank"  color="#81d742" textcolor="#ffffff" icon="chevron-sign-right"]Download[/button]

2. WP SyntaxHighlighter


Supported languages

AppleScript, ActionScript3, Bash, ColdFusion, C, C++, C#, CSS, Delphi, Diff, Erlang, Groovy, HTML, Java, Java FX, JavaScript, Pascal, Patch, Perl, PHP, Plain text, PowerShell, Python, Ruby, Ruby on Rails, Sass, SCSS, Shell, SQL, VB, VB NET, XHTML, XML and XSLT Note: A part of languages are only for SyntaxHighlighter 3.0. You can also use a bundled plugin to add following languages. Biferno, Clojure, DOS batch file, F#, LISP, Lua(only for SyntaxHighlighter 3.0), MEL Script, Objective-C, PowerCLI, Processing, R, S, S-PLUS, Tcl, Verilog, Vim Script and YAML For details, see “sample” directory. There are many other languages for “SyntaxHighlighter”. But I can’t bundle them because they are not compatible with this plugin license. If you want, try to search.

Recommended plugin

[button href="http://wordpress.org/plugins/wp-syntaxhighlighter/" size="medium" color="#81d742" textcolor="#ffffff" target="_blank" icon="chevron-sign-right"]Demo[/button]

3.  SyntaxHighlighter CKEditor Button

syntaxhighlighter-ckeditor-button screenshot 1

This plugin provides an additional code button for WordPress CKEditor so that you can use syntaxhighlighter with CKEditor. CKEditor For WordPress plugin replaces the default WordPress editor with CKEditor, whileAuto SyntaxHighlighter plugin intergrates alexgorbatchev SyntaxHighlighter JavaScript package into WordPress but doesn’t provide a code button for CKEditor. This is why I created the plugin. syntaxhighlighter-ckeditor-button screenshot 2

The user interface for adding codesyntaxhighlighter-ckeditor-button screenshot 3   [button href="http://wordpress.org/plugins/syntaxhighlighter-ckeditor-button/screenshots/" size="medium" color="#81d742" textcolor="#ffffff" target="_blank" icon="chevron-sign-right"]Demo[/button]

4.  Auto SyntaxHighlighter

Auto SyntaxHighlighter is a WordPress Code highlight plugin. It’s used alexgorbatchev SyntaxHighlighter JavaScript package. Autoload SyntaxHighlighter only requisite js files and display you code. Github address: https://github.com/wkii/Auto-SyntaxHighlighter Support languages see: SyntaxHighlighter Brushes. Full Support for : AppleScript, ActionScript3, Bash/shell, C#, C++, CSS, Delphi, Diff, Groovy, JavaScript, Java, Perl, PHP, Plain Text, Python, Ruby, Sass, Scala, SQL, Visual Basic and XML/HTML… It’s advantages:

  • Don’t write database;
  • Don’t need settings;
  • Deactivate plugin code can also display properly;
  • Code can switch visual editing mode or HTML mode;
  • With the w3c standards;
  • Insert code small tools;
  • Automatic and only loading requisite files;
  • Write code to support non-administrator

auto-syntaxhighlighter screenshot 2

[button href="http://wordpress.org/plugins/auto-syntaxhighlighter/screenshots/" size="medium" color="#81d742" textcolor="#ffffff" target="_blank" icon="chevron-sign-right"]Demo[/button]

5.  Syntax Highlighter++

syntax-highlighter-with-add-button-in-editor screenshot 1

This plugin not only provides you syntax-highlighter , but also add a textarea and a button in the post page . you just have to select the language , add code to the textarea and click the ‘OK’ button , and you will get your code highlighted in your atricle. Supported Languge: Bash C C++ C# CSS Delphi Diff Erlang Groovy HTML Java Javascript Perl PHP PowerShell Python Ruby SQL VisualBasic VB.NET XML [button href="http://wordpress.org/plugins/syntax-highlighter-with-add-button-in-editor/screenshots/" size="medium" color="#81d742" textcolor="#ffffff" target="_blank" icon="chevron-sign-right"]Demo[/button]

6.  CodeMirror for CodeEditor


Just another code syntaxhighligher for the theme and plugin editor with CodeMirror. This plugin can highlight sourcecodes in the theme/plugin editor and provide a useful toolbar.


  • Highlight sourcecodes in theme and plugin editor on the dashboard.
  • Based on Marijn Haverbeke’s “CodeMirror” JavaScript library.
  • Built-in 10 themes.
  • Useful toolbar which includes search/replace features.
  • Full-screen editing.
  • Auto-complete.
  • Easy to configure features through the setting panel.
  • Localization: English(Default), 日本語(Japanese, UTF-8).

Support languages

  • PHP
  • CSS
  • Javascript
  • (X)HTML
[button href="http://wordpress.org/plugins/codemirror-for-codeeditor/" size="medium" color="#81d742" textcolor="#ffffff" target="_blank" icon="chevron-sign-right"]Demo[/button]

7.  Syntax Highlighter MT

syntax-highlighter-mt screenshot 2
Styled Groovy code using the Django theme.
syntax-highlighter-mt screenshot 3
Styled Groovy code using the FadeToGrey theme. This plugin works like many of the others that enable the use of the Syntax Highlighter tool. Dynamic plugin loading is now available as part of the Syntax Highlighter tool, making brush configuration obsolete. Available brushes are:[code]
actionscript3 as3
bash shell
coldfusion cf
cpp c
c# c-sharp csharp
delphi pascal
diff patch pas
erl erlang
jfx javafx
js jscript javascript
objc obj-c
perl pl
text plain
py python
ruby rails ror rb
sass scss
vb vbnet
xml xhtml xslt html


[button href="http://wordpress.org/plugins/syntax-highlighter-mt/" size="medium" color="#81d742" textcolor="#ffffff" target="_blank" icon="chevron-sign-right"]Demo[/button]

Add Your Comment