WP-CodeBox free WordPress plugin
Description
WP-CodeBox free WordPress plugin
WP-CodeBox provides clean syntax highlighting and AJAX advanced features for embedding source code within pages or posts.
It support wide range of popular languages highlighting with line numbers, code download, Copy to clipboard,
collapse codebox,automatic keywords link to API manual and maintains formatting while copying snippets of code from the browser.
It’s provide simple background configuration for highlighter style/formatting customization.
Since the plugin is developing, in the future it will support more options.(CSS option,Keywords display style,Auto Caps/Nocaps,Case Sensitivity etc. )
Basic Usage
Wrap code blocks with
and
Possible Parameters:
lang=”LANGUAGE” – LANGUAGE is a GeSHi supported language syntax.
file=”download.txt” – The file will create a code downloading attribute.
line=”N” – The N is the starting line number.
colla=”+/-” – The +/- will expand/collapse the codebox.
line,file,colla is optional.
More usage examples
About Author
Eric Wang
Usage
Example 1: PHP, no line numbers
Example 2: Java, with line numbers,collapse codebox
public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } }
Example 3: Ruby, with line numbers starting at 18, code downloading(ruby.txt)
class Example def example(arg1) return "Hello: " + arg1.to_s end end