Announcing Prismatic for WordPress! Prismatic is a free WordPress plugin that enables you to display beautiful syntax-highlighted code using either Prism.js or Highlight.js. Prismatic also escapes code snippets on the front-end, in the Admin Area, or both. There’s even an option to escape code snippets without syntax highlighting, so you can apply your own custom styles. Prismatic is fast, free, flexible, and loaded with features. Read on to learn more..
Over 80+ Themes
Prismatic lets you choose between two of the most popular syntax-highlight libraries — Prism.js and Highlight.js — so you get over 80 syntax themes to choose from, plus some great built-in functionality, including line numbers, line highlighting, and show language. Other features include limiting highlighting to WP Posts and Pages, smart loading of assets, and support for no-prefix class names (for Highlight.js).
Here is a list of languages supported when using the Prism.js library:
And here is a list of languages supported when using the Highlight.js library:
If you are using a language that you don’t see here, drop a line — I’m more than happy to add more :)
In addition to syntax highlighting, Prismatic also escapes code snippets. You can enable code escaping when using Prism.js, Highlight.js, or neither. So if you just want to display cleanly escaped code without any syntax highlight applied, enable the “Plain Flavor” option and you’re good to go. For each of these three options — Prism.js, Highlight.js, or Plain Flavor — Prismatic gives you fine-grained control over where your code snippets are escaped:
- 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
So when code escaping is enabled for either/both the frontend or Admin Area, the plugin makes the following changes to any code contained within
\r removed & replaced with & < replaced with < > replaced with > trailing whitespace removed
That’s it — no other changes are made to code snippets. Check out the Prismatic documentation for more details.
Prismatic is designed for optimal performance, flexibility, and security. Display your code in style, easily and beautifully with Prismatic for WordPress. To learn more about Prismatic, check out the launch post at Perishable Press, or hit the WordPress Plugin Directory for complete documentation and free download: