=== WP SyntaxHighlighter === Contributors: redcocker Donate link: http://www.near-mint.com/blog/donate/ Tags: syntaxhighlighter, code, snippet, syntax, highlight, highlighting Requires at least: 2.8 Tested up to: 3.2.1 Stable tag: 1.4.3 This plugin is code syntax highlighter based on SyntaxHighlighter ver. 3.0.83 and 2.1.382. == Description == This plugin is code syntax highlighter based on Alex Gorbatchev's SyntaxHighlighter ver. 3.0.83 and 2.1.382. = Features = * Based on Alex Gorbatchev's "[SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/ "SyntaxHighlighter")" JavaScript library. * Including both SyntaxHighlighter 3.0.83 and 2.1.382.(Can switch between 3.0.83 and 2.1.382.) * You can operate in Visual Editor, No need to use HTML Editor. * Using two buttons, easy to wrap your code in `
` tag and change language and options of previously-markuped code.
* Once your code is wrapped in `
` tag, You can type 'tabs' for indent.
* Easy to configure features through the setting panel.
* Support "[Dynamic Brush Loading](http://alexgorbatchev.com/SyntaxHighlighter/manual/api/autoloader.html "A key feature")" which allows to load only necessary brush files dynamically.
* Loading JavaScripts on only posts, pages, home, archives, search results and comments which have the code to highlight.
* Localization: English(Default), 日本語(Japanese, UTF-8).

= 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 add following languages using bundled sample plugin.

F#, Lua(only for SyntaxHighlighter 3.0), Processing, R, S, S-PLUS, Tcl, Verilog 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 =

"WP SyntaxHighlighter" has useful built-in buttons to mark-up your code.

However, If you want, you can also use the feature-rich "[SyntaxHighlighter TinyMCE Button](http://wordpress.org/extend/plugins/syntaxhighlighter-tinymce-button/ "Recommended plugin")".

= Thanks =

* "SyntaxHighlighter" libraries was created by [Alex Gorbatchev](http://alexgorbatchev.com/SyntaxHighlighter/ "Alex Gorbatchev").
* F# brush was written by [Steve Gilham](http://stevegilham.blogspot.com/2009/10/syntaxhighlighter-20-brushes-for-f-and.html "Steve Gilham").
* "shBrushLua.js" was created by [최익필](http://ikpil.com/1191 "최익필").
* "shBrushProcessing.js" was created by [Sebastian Korczak](http://en.myinventions.pl/index.php?page=ProcessingSyntaxHighlighting "Sebastian Korczak").
* The css for "shBrushProcessing.js" was written by [Sebastian Korczak](http://en.myinventions.pl/index.php?page=ProcessingSyntaxHighlighting "Sebastian Korczak").
* "shBrushR.js" was created by [Yihui Xie](http://yihui.name/en/2010/09/syntaxhighlighter-brush-for-the-r-language "Yihui Xie").
* "shBrushTcl.js" was created by [henix](http://www.henix-blog.co.cc/blog/tcl-syntaxhighlighter-brush.html "henix").
* "shBrushVerilog.js" was created by [Hanly De Los Santos](http://www.hdelossantos.com/2010/05/20/verilog-syntaxhighlighter-brush/ "Hanly De Los Santos").
* "shBrushYaml.js" was created by [Nicolas Perriault](http://prendreuncafe.com/blog/post/2009/07/26/YAML-Brush-for-the-SyntaxHighlighter-Javascript-Library "Nicolas Perriault").

== Installation ==

= Installation =

1. Upload plugin folder to the `/wp-content/plugins/` directory.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. If you need, go to Settings -> WP SyntaxHighlighter to configure.

= Usage =

**Usage: To wrap your code in `
` tag with "SH TinyMCE Button".**

If you have previously-written code on your post or page, by this way, you can wrap your code in `
` tag for 'SyntaxHighlighter'.

1. With the mouse, select and highlight your code where you want to aplly "SyntaxHighlighter".
1. Click "pre" button.
1. Select language and options.
1. Click "Insert" button.

**Usage: To paste your code into the post or page with "SH TinyMCE Button".**

If you want to copy the code from the other document and paste into your post or page, this way is best. Your pasted code will be warpped in `
` tag automatically.

1. Click "CODE" button.
1. Select language and options and paste your code into textbox.
1. Click "Insert" button.

**Usage: To change language and options of previously-markuped code with "SH TinyMCE Button".**

1. With the mouse, select and highlight your code.
1. Click "pre" button.
1. Change language and options.
1. Click "Update" button.

**Usage: To indent by tabs.**

1. Just type tab in your code. But till your code is wrapped in `
` tag, you can not type any tabs.

**Usage: Using HTML Editor without "SH TinyMCE Button".**

1. Just wrap Your Code in `
` tag with the class attribute as below in HTML Editor or using the "Preformatted" style in Visual Editor.

However, your codes **must be escape to HTML entities in HTML Editor**.

Just escape following 5 characters: <, >, &, ", '

`
Your Code
` *"lang" = your language * e.g. `
Your PHP Code
` * e.g. `
Your XHTML Code
` See "[Available languages](http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/ "Brushes")". *"Brush aliases" means "lang". You can also use some options with `
` tag.

See "[Options](http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/ "Class value")".

* e.g. `
Your Code
` * e.g. `
Your Code
` This plugin also can support `