Provides a simple way to use the Syntax Highlighter tool from http://alexgorbatchev.com/wiki/SyntaxHighlighter
Author: | Chad Johnston (profile at wordpress.org) |
WordPress version required: | 2.7.1 |
WordPress version tested: | 4.3.0 |
Plugin version: | 2.2.5 |
Added to WordPress repository: | 22-10-2009 |
Last updated: | 18-08-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | http://www.megatome.com/syntaxhighlighter |
Total downloads: | 23 796 |
Active installs: | 100+ |
Click to start download
|
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:
applescript
actionscript3 as3
bash shell
coldfusion cf
cpp c
c# c-sharp csharp
css
delphi pascal
diff patch pas
erl erlang
groovy
hive
java
jfx javafx
js jscript javascript
objc obj-c
perl pl
php
pig
text plain
py python
ruby rails ror rb
sass scss
scala
sql
vb vbnet
xml xhtml xslt html
Screenshots
Styled Groovy code.
Styled Groovy code using the Django theme.
Styled Groovy code using the FadeToGrey theme.
FAQ
Highlighting code
The basic usage is: <pre class="brush:brush_name">...code...</pre>
where brush_name
is one of the available brushes.
Why does my content containing “<” and “>” get messed up?
This is an issue with using the <pre />
tags. Replace the <
characters with their entity escape of <
to get the desired result.
See http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html for more discussion.
(Note that this issue only happens if you are using the <pre />
tags to surround the highlighted code.)
I get an error saying “Can’t find brush for: xxx”
The most likely issue is that the specified brush is not available as part of the plugin install.
Why “Syntax Highlighter MT”?
There are several plugins already that are named Syntax Highlighter, or some variant. I added “MT” (for Megatome Technologies – my company) to the name to make it unique.
ChangeLog
2.2.5
- Verified to work with WordPress 4.1.
2.2.4
- Verified to work with WordPress 3.9.
- Updated docs to describe changing themes. (GitHub Issue #2)
- Properly serve assets over HTTPS as well as HTTP. (GitHub Issue #1)
2.2.3
- Verified to work with WordPress 3.8.
- Updated docs to include advanced usage.
2.2.2
- Added brushes for Pig and Hive QL.
2.2.1
- No functional changes. Just updating the compatible WP version numbers to be the most recent.
2.2
2.1
- Added ability to select coloration theme. This is a global setting.
2.0.1
- No functional changes. Just updating the compatible WP version numbers to be the most recent.
2.0
- Incorporate Syntax Highlighter 3.0.83
- Remove option page for enabled brushes since the Syntax Highlighter tool now uses dynamic loading
1.0