Syntax Highlighter ComPress is a simple WordPress plugin, that is based on the latest Alex Gorbatchev’s SyntaxHighlighter Script. Code and source text of different mark-up or programming languages can be highlighted in WordPress.
There are other WordPress plugin based on the SyntaxHighlighter Script but these cause long page loading times and they are difficult to handle. The advantage of Syntax Highlighter ComPress is that only necessary brush files will be loaded dynamically. Another advantage is that your code can easily pasted into your posts, no need to replace all ‘
<‘ with ‘
The plugin is localized in English, German and Romanian.
This plugin requires WordPress 2.6 or later.
- Unzip and upload the files to your ‘wp-content/plugins/’ directory.
- Activate the plugin by logging into your WordPress administration panel, going to ‘Plugins’, then clicking the ‘Activate’ button for ‘Syntax Highlighter Compress’.
- Done, enjoy it.
Usage with the TinyMCE button:
- Create a new post or page in WordPress or open an existing post/page.
- Place the cursor into the main textarea where you want to insert the code.
- Click on the new TinyMCE button, you can find after the activation of the plugin.
- Click on the ‘Insert’ button. That’s all.
Usage without TinyMCE button:
- Take your code and replace all ‘
<‘ with ‘
<‘ (Seach & Replace).
Then enclose your code with the pre Tag like this:
<pre class="brush:[code-alias]"> [Your Code Here] </pre>
For the ‘[code-alias]’ segment you have to choose the right syntax/brush alias. For all the available brush aliases check out Alex Gorbatchev’s Webpage. PHP code should look like this:
<pre class="brush:php"> <?php $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input, 2); echo $input[$rand_keys] . "\n"; ?> </pre>
- Paste final code into the main textarea of WordPress. Be sure, that you do this in the HTML view.`
- Which browsers are supported?
The most common browsers are supported.
- Which version of wordPress do I need?
You need WordPress 2.6 or later.
기여자 & 개발자
“Syntax Highlighter Compress”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.기여자
자국어로 “Syntax Highlighter Compress”(을)를 번역하세요.
개발에 관심이 있으십니까?
- Added Romanian translation (THX to Alexander Ovsov – Web Geek Sciense)
- Fixed problem with the tab-size input field
- Fixed some bugs in the autoload script
- Cleaner settings menu code
- Upgraded Syntax Highlighter script (version 3.0.83)
- New Dynamic brush loading: only necessary brush files get loaded
- Added settings menu where you can change the theme and other options
- First release, nothing changed so far