Horje
CodeColorer is a syntax highlighting plugin which allows inserting code snippets into blog posts. The plugin supports color themes, code samples in RS …

Noted That:

  • To install correctly this codecolorer.zip.
  • Fisrt Download the codecolorer.zip to your computer
  • Extract/Open codecolorer.zip to Your Computer.
  • Then, Find readme.txt file inside codecolorer.zip and Open readme.txt.
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the the Tips Below.

Start the Tips:

1. First Download "codecolorer.zip" Plugin to your Local Computer. (Click Download)

2. Then, Login to your "yourdomain.com/wp-admin" Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on "Plugins" + "Add New" from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse "codecolorer.zip" Downloaded plugin from your computer, Where you downloaded codecolorer.zip According to Step – 1 Above then, click on "Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on "Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. "CodeColorer" folder is added on left sidemenu. Now, Click on "CodeColorer" folder.

   Noted that: If you do not see "CodeColorer" folder on left sidemenu then, see at left sidemenu "Settings" or "Tools".

8. Now you configure yourself oR Watch video tutorial below about CodeColorer Configurtions and Settings or How to work "CodeColorer" in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to "Plugins" + "Installed Plugin" from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find "CodeColorer" Activated Plugin from Plugin List.
  4. Then, Click on "Settings" from Plugin that is CodeColorer
  5. Now, Edit/Add/Config the setting and Click on "Save Changes" button,
WP Plugin Setting



Guide
  1. Download and unpack plugin files to wp-content/plugins/codecolorer directory.
  2. Enable CodeColorer plugin on your Plugins page in Site Admin.
  3. Go to the Options/CodeColorer page in Site Admin and change plugin’s options as you wish.
  4. Use [cc lang="lang"]code[/cc] or code syntax to insert a code snippet into the post (you could skip lang="lang", in this case code would be in CodeColorer’s code block, but without syntax highlighting). Also you can use [cci lang="lang"]code[/cci] to format inline code (see the “inline” option description).
  5. Have fun!

Syntax

To insert a code snippet into your post (or comment) you would use [cc lang="lang"]code[/cc] or code 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, on or off, number 1 or 0.

Short codes

Starting from CodeColorer 0.8.6 you can use short codes to insert code snippets. The short code in common looks like [ccM_LANG], where LANG is your programming language, and M is the one or more of following modes:

  • iinline
  • eescaped
  • sstrict
  • nline_numbers
  • bno_border
  • wno_wrap
  • lno_links

Small letter means enabled, capital – disabled. Examples:

PHP code with links enabled and line numbers disabled:

[cclN_php]
echo "hello"
[/cclN_php]

Already escaped HTML code:

[ccie_html]<html>[/ccie_html]

Ruby code without wrapping having tab size equal to 4:

[ccW_ruby tab_size="4"]
attr_accessor :title
[/ccW_ruby]

More examples could be found on the CodeColorer Examples page. You can find modes explained below.

Possible parameters

  • lang (string) – source language.
  • tab_size (integer) – how many spaces would represent TAB symbol.
  • lines (integer) – how many lines would be block height without scroll; could be set to -1 to remove vertical scrollbar.
  • width (integer or string) – block width.
  • height (integer or string) – height in pixels; used when lines number is greater then “lines” value.
  • rss_width (integer or string) – block width in RSS feeds.
  • theme (string) – color theme (default, blackboard, dawn, mac-classic, twitlight, vibrant, geshi, railscasts, solarized-light, solarized-dark).
  • first_line (integer) – a number of the first line in the block.
  • highlight (string) — a comma-separated list of line numbers or ranges of line numbers to highlight (e.g. 1,5,8-11).
  • escaped (boolean) – when true special HTML sequences like < or [ will be treated as encoded (in this example as < and [ respectively.)
  • line_numbers (boolean) – when true line numbers will be added.
  • no_links (boolean) – when false keywords will be represented as links to manual.
  • inline (boolean) – when true forces code block to render inside “`. Used to paste a single line of code into the regular text.
  • strict (boolean) – when true strict mode will be enabled. By default CodeColorer tries to guess whether strict mode is needed, so this option allows to force it on or off when automatic suggestion is wrong.
  • nowrap (boolean) – when false no horizontal scrollbar will be shown; instead code will be wrapped in the end of code box.
  • noborder (boolean) – when true no border will be shown around the code block.
  • no_cc (boolean) – when true the syntax in code block will not be highlighted, code will be rendered inside ``` tag.
  • class (string) – additional CSS classes to add to the wrapper HTML element.
  • file (string) — when specified, code will be loaded from external file. Should be a relative to uploads folder path, only files from uploads are allowed to be embedded.

You can use special tag [cci] instead of [cc] to force inline mode:

[cci lang="php"]some code[/cci]

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

To insert example of CodeColorer short codes you can use something like this:

[cce_bash]
&#91;cc lang="html"]CodeColorer short code colorized&#91;/cc]
[/cce_bash]

plugin, code, posts, blog, supports, color, samples, themes, into, snippets,

Name

Reffered: https://wordpress.org/

Share on: