WordPress Plugin: Prismatic

[ Prismatic ] I’ve been using other plugins to display my code at Perishable Press, Plugin Planet, DigWP, and WP-Mix for years now. The other plugins have done the job, but there are things that I’ve always wanted to change. For example, syntax highlighting. I use syntax highlighting for code snippets at WP-Mix, but not on any of my other sites. So I wanted to combine clean, time-tested code escaping with stylish syntax highlighting. After sharing well over 1,000 code snippets online, I figure it’s finally time to make it happen..

Announcing Prismatic — a plugin that cleanly escapes code snippets and applies syntax-highlighting using either Prism.js or Highlight.js.

Choose your library

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 using Highlight.js
  • Plain Flavor – Code escape without syntax highlight (for custom styles)

Prism.js Features

Prismatic brings the following features when Prism.js is enabled:

  • Supports over 30 coding languages
  • Choose from all 7 available Prism themes
  • Enable Prism plugin Line Numbers
  • Enable Prism plugin Line Highlight
  • Enable Prism plugin Show Language
  • Highlights code in post content, excerpts, and comments
  • Detects language- and lang- class prefixes
  • Limit syntax highlighting to Posts and Pages
  • Highlight single-line and multi-line code
  • Granular control over code escaping
  • Smart loading of CSS & JS assets

Highlight.js Features

Prismatic brings the following features when Highlight.js is enabled:

  • Supports 23 coding languages
  • Choose from all 77 available Highlight themes
  • Customize the Highlight.js init JavaScript
  • Highlights code in post content, excerpts, and comments
  • Limit syntax highlighting to Posts and Pages
  • Highlight multi-line blocks of code
  • Detects language- and lang- class prefixes
  • Enable support for no-prefix class names
  • Granular control over code escaping
  • Smart loading of CSS & JS assets

Code Escaping

Prismatic brings the following features when using the “Plain Flavor” option (for code escaping without syntax highlighting):

  • Enable code escaping for post content, excerpts, and/or comments
  • Enable code escaping on the frontend, Admin Area, or both
  • Escapes single-line and multi-line code snippets

Prismatic also provides these same code-escape options when using Prism.js or Highlight.js. You get clean, beautiful code with or without syntax highlighting, it’s completely up to you :)

Screenshots

Here is a screenshot of Prismatic in action:

[ Prismatic Syntax Highlighting ]
Prismatic – Choose from over 80 syntax-highlight themes

You can check out more screenshots at the WP Plugin Directory »

Get Prismatic

Prismatic is designed for optimal performance: it only loads required CSS and JavaScript when there are code snippets on the page. Prismatic is flexible: you choose the best library, theme, and features for your site. Likewise with code escaping: you choose when and where to escape your code snippets on the front-end and in the Admin Area. Prismatic is secure: built with the WP API and solid PHP functionality.

Learn more and download Prismatic »