
This plugin allows you very simply syntax highlight source code in your content using highlight.js or google-code-prettify libraries.
| Author: | Clearcode (profile at wordpress.org) |
| WordPress version required: | 4.6.1 |
| WordPress version tested: | 5.9.13 |
| Plugin version: | 1.2.3 |
| Added to WordPress repository: | 29-09-2016 |
| Last updated: | 16-03-2022
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
| Rating, %: | 100 |
| Rated by: | 1 |
| Plugin URI: | https://wordpress.org/plugins/cc-syntax-highl... |
| Total downloads: | 4 681 |
| Active installs: | 80+ |
![]() Click to start download |
|
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?
- Go to the ‘Settings > Syntax Highlight’ page, select your preferred options and save them.
- Simply add the source code to your post (or other selected public Custom Post Type) wrapped with:
<pre><code>Your source code</code></pre>
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):
<pre>[code]Your source code[/code]</pre>
Plugin’s js scripts and css styles files only load if the source code occurs on displaying page.
Screenshots
ChangeLog

