Codeblocks Extended with PrismJS

Codeblocks Extended with PrismJS was born of a personal need for a lightweight code highlighter, with special functionality. Many of the other PrismJS based plugins in the repository were either outdated, or were lacking features that I was looking for.

Features:

  • Integrates the latest PrismJS build, with the most common langauges used.
  • Integrates the PrismJS line-numbers plugin, to automatically number lines of code.
  • Integrates the PrismJS line-highlight plugin to allow you to highlight specific lines of code.
  • Integrates ClipboardJS + custom jQuery to add a "Copy to Clipboard" button to each code block.
  • Custom Text Editor button to wrap selected text with the most commmon <pre> and <code> classes, and replacing special characters with their HTML safe equivalents.
  • Custom Visual Editor / TinyMCE dropdown button, with the most common languages to wrap selected text.
  • Since this works via wrapping <pre> and <code> tags with classes, you can use all custom class settings that PrismJS offers.
  • No shortcodes to mess with, so you don't have to worry about losing whitespace between editor modes.
  • No settings page needed: Just activate it and go!

For a full list of languages supported and more information on this plugin's use, please check out the FAQ.

Note: This does NOT auto-detect the language. Most plugins that do so brute force the languages or require file extensions, resulting in a much heavier plugin. The decision was made to keep this as light-weight as possible.

To see how this plugin was made, check out the guide at WP Tech Guides .

Thanks to Mike @ WP Bullet for the banner and icon.

bbPress Code Snippets

No fancy, complicated syntax highlighting here. The goal of this plugin is to allow your bbPress users to post code snippets in their forum topics and replies without having to learn anything new. Basically, any raw HTML/PHP posted within <pre> or <code> tags will automatically be conver.........

Similar: 29%

WP-Markdown-Syntax-Sugar

WP Markdown Syntax Sugar work in conjunction with plugins such as wp-markdown and wp-highlight.js. Markdown is fantastic markup for easily writing blogs, and highlight.js is an extremely easy way to highlight code examples. In most cases, highlight.js automatically detects the proper language for a .........

Similar: 29%

Goodbye Syntax Highlighter

For years I've used Alex Gorbatchev's SyntaxHighlighter. It has served me well over the years. When I moved to WordPress I tried various plugins based on the library, such SyntaxHighlighter Evolved. I've decided to start blogging using Markdown. Making this move I needed to find a way to highlight .........

Similar: 25%

TinyMCE Code Formatting

The Pre button toggles the preformatted style on the selected text or the current line (applies <pre> tag to blocks). The Code button toggles the code style on the selected text or the current word (applies <code> tag to inline elements). The default shortcuts for the buttons are: Ctr.........

Similar: 25%

Syntax Highlighter Lite

This plugin prettifies/beautifies/highlights source code placed inside <pre class="prettyprint"> tags. It is a light plugin with only 2 files....

Similar: 23%

Pastacode

With Pastacode, you can easily add code into your posts with the awesome PrismJs coloration library. You can insert source code into the post editor, from a file, or from webservices like GitHub, Gist, Pastebin or BitBucket. Webservices responses are cached in order to avoid too many HTTP requests. .........

Similar: 20%

Prismatic

Brand new plugin with all-new shiny code fresh from the WP API! The only 3-in-1 syntax highlighter! Display beautiful code snippets with Prism.js, Highlight.js, or plain code escaping: Prism.js - Code escape + syntax highlight using Prism.js Highlight.js - Code escape + syntax highlight .........

Similar: 19%

Prism Syntax Highlighter for WordPress

Despite two plugins already on wordpress.org I decided to write my own from scratch. The result is a minimalistic but powerful plugin with only ~250 lines of PHP. Supports every possible Prism configuration. Does not load prism on every page, only when needed. Supports automatic detection of prism.........

Similar: 19%

Cipher

A compendium of features below, details on Cavalieri.io › Cipher. 'code' and 'pre+code' QuickTags able to replace special characters with HTML entities. Auxiliary editor to insert/edit encoded snippets of code in the WordPress editor. Formatted chunks of code or pieces of code longer than 70 chara.........

Similar: 14%

Wp-Syntax Hacktify

A plugin allowing you to change the WP-Syntax code highlighting color scheme elegantly. WP-Syntax rawks for writing about geeky stuff, but I want it more blacker. And I want a CSS file to hack instead of those icky and inefficient inline styles. I got the basic idea from WP-Syntax-Colorizer but w.........

Similar: 10%