Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
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.

About the Author
Jeff Starr = Fullstack Developer. Book Author. Teacher. Human Being.
GA Pro: Add Google Analytics to WordPress like a pro.

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 »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Thoughts
I disabled AI in Google search results. It was making me lazy.
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources. Also: “The Web” is not a valid answer.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.