Prismatic

plugin banner

Display beautiful syntax-highlighted code snippets with Prism.js or Highlight.js

Author:Jeff Starr (profile at wordpress.org)
WordPress version required:4.1
WordPress version tested:5.4.1
Plugin version:2.4
Added to WordPress repository:24-10-2016
Last updated:25-03-2020
Rating, %:96
Rated by:24
Plugin URI:https://perishablepress.com/prismatic/
Total downloads:18 053
Active installs:1 000+
plugin download
Click to start download

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

Check out a demo post using Highlight.js. I also use this plugin at WP-Mix for all code snippets.

Prism.js Features

  • Supports 50 coding languages
  • Choose from all 8 available Prism themes
  • Provides a Gutenberg block for adding code snippets
  • Provides TinyMCE/Visual buttons for adding code snippets
  • Enable Prism plugin Line Numbers
  • Enable Prism plugin Line Highlight
  • Enable Prism plugin Show Language
  • Enable Prism plugin Copy Code Button
  • 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
  • Support for ACF on single post views

Highlight.js Features

  • Supports 39 coding languages
  • Choose from all 90+ available Highlight themes
  • Provides a Gutenberg block for adding code snippets
  • Provides TinyMCE/Visual buttons for adding code snippets
  • 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

Plain Flavor Features

  • Enable code escaping for post content, excerpts, and/or comments
  • Enable code escaping on the frontend, Admin Area, or both
  • Provides a Gutenberg block for adding code snippets
  • Provides TinyMCE/Visual buttons for adding code snippets
  • Escapes single-line and multi-line code snippets
  • Escapes <code> tags (based on configuration)

General Features

  • Easy to set up & configure
  • Built with the WordPress API
  • Squeaky clean, error-free code
  • Born of simplicity, no frills
  • Lightweight, fast and flexible
  • Focused on performance and security
  • Loads CSS/JS assets only when required
  • Adheres to HTML coding best practices
  • Works with the Gutenberg Block Editor
  • Regularly updated and “future proof”

Prismatic escapes only the essentials to keep your code clean.

Check out the screenshots for more details!

Privacy

This plugin does not collect or store any user data. It does not set any cookies, and it does not connect to any third-party locations. Thus, this plugin does not affect user privacy in any way.

Support development of this plugin

I develop and maintain this free plugin with love for the WordPress community. To show support, you can make a donation or purchase one of my books:

And/or purchase one of my premium WordPress plugins:

Links, tweets and likes also appreciated. Thank you!


Screenshots
FAQ
ChangeLog