Home Plugins cc syntax highlight
CC-Syntax-Highlight logo

CC-Syntax-Highlight

by Clearcode on WordPress.org

This plugin allows you very simply syntax highlight source code in your content using highlight.js or google-code-prettify libraries.

(1)
CC-Syntax-Highlight Settings - Visit the 'Settings > Syntax Highlight' page, select your preferred options and save them.

CC-Syntax-Highlight Settings - Visit the 'Settings > Syntax Highlight' page, select your preferred options and save them.

The CC-Syntax-Highlight plugin supports syntax highlighting of Posts, Pages, and any public Custom Post Types.
It uses highlight.js or google-code-prettify libraries.
Additionally it can use the clipboard.js library to add a button that copies text to the clipboard and highlightjs-line-numbers.js plugin to add line numbers.
It is delivered with support for shortcode (default [code] – you can change it on the settings page) which automatically converts all special characters to HTML entities.
This plugin is compatible with Multisite WordPress installations.

How does it work?

  1. Go to the ‘Settings > Syntax Highlight’ page, select your preferred options and save them.
  2. Simply add the source code to your post (or other selected public Custom Post Type) wrapped with:
    Your source code

    or if you would like to automatically convert all special characters to HTML entities, use shortcode wrapper instead (default [code] – you can change it on the settings page):
    [code]Your source code[/code]

Plugin’s js scripts and css styles files only load if the source code occurs on displaying page.

Active installations80+
Weekly downloads
18-14.29%
Version1.2.3
Last updated3/16/2022
WordPress version4.6.1
Tested up to5.9.10
PHP version7.0
Tags
codegoogle-code-prettifyhighlight.jssource codesyntax highlight