Plugin Directory

CodeColorer

  1. Download and unpack plugin files to wp-content/plugins/codecolorer directory.
  2. If you have not used CodeColorer early, rename wp-content/plugins/codecolorer/codecolorer.css.in to wp-content/plugins/codecolorer/codecolorer.css.
  3. Enable "CodeColorer" plugin on your Plugins page in Site Admin.
  4. Go to the Options/CodeColorer page in Site Admin and change plugin's options as you wish.
  5. Use [cc lang="lang"]code[/cc] or <code lang="lang">code</cc> syntax to insert code snippet into the post (you could skip lang="lang", in this case code would be in codecolorer block, but without syntax highlighting).
  6. Have fun!

Syntax

To insert code snippet into your post (or comment) you should use [cc lang="lang"]code[/cc] or <code lang="lang">code</cc> syntax. Starting from version 0.6.0 you could specify additional CodeColorer options inside [cc] tag:

[cc lang="php" tab_size="2" lines="40"]
// some code
[/cc]

Note: You should always use double quotes or single quotes around the parameter value. Boolean values could be passed using string true or false, number 1 or 0.

Possible parameters:

  • lang (string) -- source language.
  • tab_size (integer) -- how many spaces would represent TAB symbol.
  • line_numbers (boolean) -- when true line numbers will be added.
  • no_links (boolean) -- when false keywords will be represented as links to manual.
  • lines (integer) -- how many lines would be block height without scroll.
  • line_height (integer) -- line height in pixels to calculate block size.

All of these parameters could be configured via the CodeColorer options page.

Download

FYI

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(2 ratings)