New Bookstore! Save 20% on books with discount code: LAUNCH
Web Dev + WordPress + Security

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. And check out a live site that is using Prismatic (scroll down to code samples).

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.

Jeff Starr
About the Author
Jeff Starr = Fullstack Developer. Book Author. Teacher. Human Being.
The Tao of WordPress: Master the art of WordPress.

One response to “WordPress Plugin: Prismatic”

  1. Prismatic looks stellar! We have started to use it as a dev tool on a few sites and digging it so far. I can’t say it will replace anything so far, but I do like that it only loads the essentials. It also appears to be coded beautifully and securely.

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
WP Themes In Depth: Deep dive into WP theme development.
Thoughts
LOL @ “weekly” support: “Your request has been received and will be reviewed soon. Neil (your support guy) checks support requests weekly. Rest assured we’ll get to it!” — Gotta be kidding with this.
After several days of work, finally taking a break. If anyone needs me, I'll be in Zora’s Domain, working thru Mah Eliya shrine.
Never ever call the client a useless idiot. Even if it’s true.
Inevitable that Google shuts down Feedburner. Maybe this year? Who knows. Here is a nice summary plus alternatives.
There is no way that Marvel can serve up anything better than what they've already done with Infinity saga/Endgame. Knowhere to go but down, sadly.
I built a new search launchpad to make my life easier. So I can search multiple engines quickly and easily.
Updating all muh plugins for WP 5.5 imminent release! Wut August :)
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.