Title: Prismatic
Author: Jeff Starr
Published: <strong>24 de Octubre de  2016</strong>
Last modified: 11 de Marzo de  2026

---

Buscar plugins

![](https://ps.w.org/prismatic/assets/banner-772x250.jpg?rev=1521267)

![](https://ps.w.org/prismatic/assets/icon-256x256.png?rev=1521267)

# Prismatic

 Por [Jeff Starr](https://profiles.wordpress.org/specialk/)

[Descargar](https://downloads.wordpress.org/plugin/prismatic.3.7.4.zip)

 * [Detalles](https://cl.wordpress.org/plugins/prismatic/#description)
 * [Reseñas](https://cl.wordpress.org/plugins/prismatic/#reviews)
 *  [Instalación](https://cl.wordpress.org/plugins/prismatic/#installation)
 * [Desarrollo](https://cl.wordpress.org/plugins/prismatic/#developers)

 [Soporte](https://wordpress.org/support/plugin/prismatic/)

## Descripción

**Display Beautiful Code**

Display beautiful code snippets with Prism.js, Highlight.js, or plain code escaping:

 * **Prism.js** – Code escape + syntax highlight using [Prism.js](https://prismjs.com/)
 * **Highlight.js** – Code escape + syntax highlight using [Highlight.js](https://highlightjs.org/)
 * **Plain Flavor** – Code escape without syntax highlighting

> 👉 The only 3-in-1 syntax highlighter!

**Live Examples**

Here are some live examples showing Prismatic displaying colorful code snippets:

 * [PHP highlighting](https://plugin-planet.com/usp-pro-support-additional-file-types/)
 * [CSS highlighting](https://perishablepress.com/all-css-filter-functions/)
 * [JavaScript highlighting](https://perishablepress.com/vanilla-javascript-add-class-to-image-links/)
 * [HTML highlighting](https://wp-mix.com/html5-starter-template/)
 * [Escaped code without highlighting](https://digwp.com/2019/07/better-inline-script/)

Prismatic is used to display thousands of code snippets on the above sites. Also
here is a post showing some [favorite Highlight.js styles](https://dev-tricks.com/favorite-highlight-js-styles/)
🙂

**Prism.js Features**

 * Supports **60+** 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
 * Option to enable Prism plugin [Line Numbers](https://prismjs.com/plugins/line-numbers/)
 * Option to enable Prism plugin [Line Highlight](https://prismjs.com/plugins/line-highlight/)
 * Option to enable Prism plugin [Show Language](https://prismjs.com/plugins/show-language/)
 * Option to enable Prism plugin [Copy Code Button](https://prismjs.com/plugins/copy-to-clipboard/)
 * Option to enable Prism plugin [Command Line](https://prismjs.com/plugins/command-line/)
 * 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 **50+** 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 and use
 * Built with WordPress APIs
 * Born of simplicity, no frills
 * Squeaky clean, error-free code
 * 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](https://wordpress.org/plugins/prismatic/#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.

Prismatic is developed and maintained by [Jeff Starr](https://x.com/perishable),
15-year [WordPress developer](https://plugin-planet.com/) and [book author](https://books.perishablepress.com/).

**Support development**

I develop and maintain this free plugin with love for the WordPress community. To
show support, you can [make a donation](https://monzillamedia.com/donate.html) or
purchase one of my books:

 * [The Tao of WordPress](https://wp-tao.com/)
 * [Digging into WordPress](https://digwp.com/)
 * [.htaccess made easy](https://htaccessbook.com/)
 * [WordPress Themes In Depth](https://wp-tao.com/wordpress-themes-book/)
 * [Wizard’s SQL Recipes for WordPress](https://books.perishablepress.com/downloads/wizards-collection-sql-recipes-wordpress/)

And/or purchase one of my premium WordPress plugins:

 * [BBQ Pro](https://plugin-planet.com/bbq-pro/) – Blazing fast WordPress firewall
 * [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) – Automatically block
   bad bots
 * [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) – Monitor traffic and
   ban the bad guys
 * [GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/)–
   Connect WordPress to Google Analytics
 * [Head Meta Pro](https://plugin-planet.com/head-meta-pro/) – Ultimate Meta Tags
   for WordPress
 * [Simple Ajax Chat Pro](https://plugin-planet.com/simple-ajax-chat-pro/) – Unlimited
   chat rooms
 * [USP Pro](https://plugin-planet.com/usp-pro/) – Unlimited front-end forms

Links, tweets and likes also appreciated. Thank you! 🙂

## Capturas de pantalla

 * [[
 * Prismatic General Settings
 * [[
 * Prismatic Prism.js Settings
 * [[
 * Prismatic Highlight.js Settings
 * [[
 * Prismatic Plain Flavor Settings
 * [[
 * Prism.js : Twilight theme (choose from 7 Prism.js themes!)
 * [[
 * Highlight.js : Arduino Light theme (choose from 77 Highlight.js themes!)
 * [[
 * Highlight.js : Gruvbox Dark theme (choose from 77 Highlight.js themes!)
 * [[
 * Cleanly escaped code without syntax highlighting (Plain Flavor)
 * [[
 * Gutenberg Prismatic block (under Formatting menu)
 * [[
 * Prismatic block showing added code and language select
 * [[
 * Prismatic TinyMCE/Visual button for adding code snippets
 * [[
 * Prismatic TinyMCE panel showing added code and selected language

## Bloques

Este plugin proporciona 1 bloque.

 *   Prismatic

## Instalación

**Installing Prismatic**

 1. Make a backup of your database
 2. Upload the plugin to your blog and activate
 3. Visit the plugin settings to configure options

[More info on installing WP plugins](https://wordpress.org/documentation/article/manage-plugins/#installing-plugins-1)

**Quick Start Guide**

Here is a quick guide to get started with Prismatic:

 1. Activate the plugin and visit the Prismatic settings page
 2. Choose Prism.js or Highlight.js for syntax highlighting
 3. Optionally visit the Prism.js or Highlight.js tab to customize options

You are now ready to go. To add a code snippet to any WP Post or Page:

 * If using Gutenberg Block Editor, click on the Prismatic block
 * If using Classic Editor, click on the Prismatic TinyMCE button

To get a better idea, view the screenshots on the [Prismatic homepage](https://wordpress.org/plugins/prismatic/#screenshots).

The Prismatic block or button makes it easy to add your code snippet and choose 
a language. The plugin automatically will output the correct markup to display your
code with syntax highlighting. No code editing required!

**Add code via block for Highlight.js**

When Highlight.js library is enabled in Prismatic plugin settings:

 1. When creating your post or page, select the Prismatic block
 2. Enter your code in the provided input field
 3. In block settings, select code language from the dropdown menu
 4. Optional: in block settings under Advanced tab, add extra CSS classes

**Add code via block for Prism.js**

When Prism.js library is enabled in Prismatic plugin settings:

 1. When creating your post or page, select the Prismatic block
 2. Enter your code in the provided input field
 3. In block settings, select code language from the dropdown menu
 4. Optional: in block settings under Advanced tab, add extra CSS classes
 5. Optional: in block settings, enter any line numbers to be highlighted

**Add code via Classic Editor**

When any library is enabled in Prismatic plugin settings:

 1. When creating your post or page, switch to the Visual Editor
 2. Click the Prismatic Quicktag button in the Toolbar, looks like <>
 3. Enter your code in the provided input field

**Complete usage documentation**

Learn more about Prismatic. Check out the [extended documentation](https://plugin-planet.com/wp/docs/prismatic.html)
for complete information and tips.

**Like the plugin?**

If you like Prismatic, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/prismatic/reviews/?rate=5#new-post).
It helps to keep development and support going strong. Thank you!

**Restore Default Options**

To restore default plugin options, either uninstall/reinstall the plugin or visit
the Prismatic General Settings > Restore default plugin options.

**Uninstalling**

This plugin cleans up after itself. All plugin settings will be removed from the
WordPress database when the plugin is deleted via the WP Plugins screen.

**Note:** that uninstalling the plugin will NOT touch any of your post content. 
Only the plugin options are removed when the plugin is uninstalled via the Plugins
screen.

## FAQ

### Can you add another language for Prism.js or Highlight.js?

Yes, feel free to [suggest a language](https://plugin-planet.com/support/#contact)

### Does this work with Gutenberg Block Editor?

Yes, the plugin provides a “Prismatic” block that makes it easy to add code snippets
that will be highlighted on the front-end. Also provides “add code” buttons for 
the Classic TinyMCE (Visual/Text) Editor. Add code, choose a language, done!

### Display syntax-highlighted code inside Block Editor?

If for some reason you want to view syntax-highlighted code inside of the Block 
Editor, you can do it with the Classic Block:

 1. Select the Classic Block
 2. Click on the Prismatic TinyMCE button
 3. Enter your code and save changes

The code won’t be highlighted initially, but if you refresh the page after making
changes, or visit the page again in the future, the code will be displayed with 
syntax highlighting applied.

### How to syntax highlight code inside of ACF field?

As of Prismatic version 2.3, code snippets inside of ACF fields are highlighted 
automatically. Simply add the required class (e.g., `language-php`) just like any
other code snippet, and the plugin will detect and highlight the code. To also escape
the highlighted code, enable escaping for post content via the setting, Prism > 
Code Escaping > Content. Note: ACF is supported only on single post views.

### How to make highlighting work with Autoptimize?

For Prismatic plugin to work with Autoptimize, a script needs to be excluded. Follow
these steps:

 1. Go to Autoptimize Settings > Javascript Options > Exclude scripts from Autoptimize
 2. Add the following to the excluded scripts list:
 3. wp-content/plugins/prismatic/lib/highlight/js/highlight-core.js

Save changes and done. You may need to empty cache and/or force-reload your web 
browser for the script to load and changes to take effect.

### How to disable block styles on frontend?

If you are not using Gutenberg Block Editor, you can disable the plugin’s block 
stylesheet. Simply enable the plugin setting, “Block Styles”. Save changes and done.

FYI: the Prismatic block styles are included via: `/prismatic/css/styles-blocks.
css`

### How to escape nested code tags?

Currently the only way to display nested `<code>` tags is to use the following shortcode:

    ```
    [prismatic_code][/prismatic_code]
    ```

Currently this works only for **inline** `<code>` tags. More details [here](https://wordpress.org/support/topic/sourcecode-with-tags-i-e-nested-tags/#post-13651551).

### Line numbers not working?

Apparently some themes have problems displaying line numbers on highlighted code
snippets. A possible solution is to add the following code via [theme template or simple plugin](https://digwp.com/2022/12/custom-code-wordpress/):

    ```
    function prismatic_add_body_class($classes) {

        $classes[] = 'line-numbers';

        return $classes;

    }
    add_filter('body_class', 'prismatic_add_body_class');
    ```

All that’s doing is adding a class named `line-numbers` to the body tag of your 
web pages. Should do the trick to get line numbers working on stubborn themes. Original
idea posted [here](https://wordpress.org/support/topic/line-numbers-line-highlight-not-working/).

### How to filter the language menu?

Check out [Filtered Language Menus with Prismatic WordPress Plugin](https://perishablepress.com/prismatic-filtered-language-menus/).

### How to disable highlighting code in comments?

Check out [Disable Highlighting in Comments with Prismatic WordPress Plugin](https://perishablepress.com/prismatic-disable-highlight-comments/).

### How I can remember to include the shortcode tags?

[Thanks](https://wordpress.org/support/topic/render-block-nested-shortcodes/) to
[@hupe13](https://wordpress.org/support/users/hupe13/), you can add this snippet
to make sure the shortcode is included when working with blocks:

    ```
    function prismatic_block_shortcode_mod($block_content, $block) {
        if ($block['blockName'] === 'prismatic/blocks') {
            if (strpos($block['innerHTML'], 'prismatic_code') === false) {
                return str_replace('[', '&#091;', $block['innerHTML']);
            }
        }
        return $block_content;
    }
    add_filter('render_block', 'prismatic_block_shortcode_mod', 10, 2);
    ```

### Got a question?

Send any questions or feedback via my [contact form](https://plugin-planet.com/support/#contact)

## Reseñas

![](https://secure.gravatar.com/avatar/89c163507faa365d3f12f786bb225593bf83c90e733ec5082f4bc72cdd46e9f4?
s=60&d=retro&r=g)

### 󠀁[Great syntax highlighter and great updating of the plugin!](https://wordpress.org/support/topic/great-syntax-highlighter-and-great-updating-of-the-plugin/)󠁿

 [Thehighwaychild](https://profiles.wordpress.org/thehighwaychild/) 10 de Diciembre
de 2024

It was hard to find a code syntax highlighter that was compatible with my version(
latest) of WP. This plugin works great! Now I have nice looking code blocks on my
front end. This developer obviously keep the plugin up to date. Great job!

![](https://secure.gravatar.com/avatar/474a526cc372c1def0fade4aad294a6f60c63f6c221e34a4600f2b7c233882a9?
s=60&d=retro&r=g)

### 󠀁[Nothing happens](https://wordpress.org/support/topic/nothing-happens-153/)󠁿

 [jarekluberek](https://profiles.wordpress.org/jarekluberek/) 8 de Diciembre de 
2024

Wordpress 6.7.1, maybe that’s the problem. Added the /prismatic, inserted code, 
choosed language in block settings. Nada. Very frustrating.

![](https://secure.gravatar.com/avatar/e10d2a9aacf0e456945701046bb6680c6832071a4aa16dbe5f5e2d603e21ab9f?
s=60&d=retro&r=g)

### 󠀁[Excellent Plugin](https://wordpress.org/support/topic/excellent-plugin-9218/)󠁿

 [vigneshsweekaran](https://profiles.wordpress.org/vigneshsweekaran/) 6 de Julio
de 2024

Easy to use

![](https://secure.gravatar.com/avatar/a41b097f9992e9400c2392abd61003172ce3c2330e05f2a85e789083e317b70e?
s=60&d=retro&r=g)

### 󠀁[great code highlighting](https://wordpress.org/support/topic/great-code-highlighting/)󠁿

 [oferdan](https://profiles.wordpress.org/oferdan/) 7 de Enero de 2023

Great code highlighting, easy to use, lightweight and fast. Supports both prism.
js and highlight.js.

![](https://secure.gravatar.com/avatar/151813d5c50a3466f6b0c7787e3d9d9817f1b711818f294d18ff0755698435b9?
s=60&d=retro&r=g)

### 󠀁[Best and fastest code highlighter](https://wordpress.org/support/topic/best-and-fastest-code-highlighter/)󠁿

 [yannpl](https://profiles.wordpress.org/yannpl/) 1 de Marzo de 2022

Easy to install, easy to configure, works out of the box. Integration of snippets
in posts and pages is effortless, the color themes are beautiful. It’s fast and 
light, doesn’t add much to page load.

![](https://secure.gravatar.com/avatar/70f166ac74ebe7ed1d91a7e433df505d8fdb69c9ec0c233ffa61b9e6bc77f832?
s=60&d=retro&r=g)

### 󠀁[Best syntax highlighting plugin](https://wordpress.org/support/topic/best-syntax-highlighting-plugin-2/)󠁿

 [kayart](https://profiles.wordpress.org/kayart/) 7 de Febrero de 2022

I’d tried a bunch of other syntax highlighting plugins before I found Prismatic.
All of them worked terribly or didn’t work at all. Prismatic is a great choice if
you need to add code snippets to your WordPress posts or pages.

 [ Leer los 45 comentarios ](https://wordpress.org/support/plugin/prismatic/reviews/)

## Colaboradores & Desarrolladores

“Prismatic” es software de código abierto. Las siguientes personas han contribuido
a este plugin.

Colaboradores

 *   [ Jeff Starr ](https://profiles.wordpress.org/specialk/)

“Prismatic” ha sido traducido en 2 idiomas. Gracias a [los traductores](https://translate.wordpress.org/projects/wp-plugins/prismatic/contributors)
por sus contribuciones.

[Traduce “Prismatic” a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/prismatic)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/prismatic/), echa 
un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/prismatic/), o
suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/prismatic/)
por [RSS](https://plugins.trac.wordpress.org/log/prismatic/?limit=100&mode=stop_on_copy&format=rss).

## Historial de cambios

Thank you to everyone providing feedback! If you like Prismatic, please take a moment
to [give a 5-star rating](https://wordpress.org/support/plugin/prismatic/reviews/?rate=5#new-post).
It helps to keep development and support going strong. Thank you!

**3.7.4 (2026/03/11)**

 * Adds whitelist sanitization for code attributes
 * Tests on WordPress 6.9 + 7.0

Full changelog @ [https://plugin-planet.com/wp/changelog/prismatic.txt](https://plugin-planet.com/wp/changelog/prismatic.txt)

## Meta

 *  Versión **3.7.4**
 *  Última actualización **hace 1 mes**
 *  Instalaciones activas **2,000+**
 *  Versión de WordPress ** 4.7 o superior **
 *  Probado hasta **7.0**
 *  Versión de PHP ** 5.6.20 o superior **
 *  Idiomas
 * [English (US)](https://wordpress.org/plugins/prismatic/), [German](https://de.wordpress.org/plugins/prismatic/),
   y [Spanish (Argentina)](https://es-ar.wordpress.org/plugins/prismatic/).
 *  [Traducir a tu idioma](https://translate.wordpress.org/projects/wp-plugins/prismatic)
 * Etiquetas
 * [code](https://cl.wordpress.org/plugins/tags/code/)[Highlight](https://cl.wordpress.org/plugins/tags/highlight/)
   [language](https://cl.wordpress.org/plugins/tags/language/)[snippets](https://cl.wordpress.org/plugins/tags/snippets/)
   [syntax](https://cl.wordpress.org/plugins/tags/syntax/)
 *  [Vista Avanzada](https://cl.wordpress.org/plugins/prismatic/advanced/)

## Calificaciones

 4.8 de 5 estrellas.

 *  [  42 valoraciones de 5 estrellas     ](https://wordpress.org/support/plugin/prismatic/reviews/?filter=5)
 *  [  0 valoraciones de 4 estrellas     ](https://wordpress.org/support/plugin/prismatic/reviews/?filter=4)
 *  [  1 valoración de 3 estrellas     ](https://wordpress.org/support/plugin/prismatic/reviews/?filter=3)
 *  [  0 valoraciones de 2 estrellas     ](https://wordpress.org/support/plugin/prismatic/reviews/?filter=2)
 *  [  2 valoraciones de 1 estrellas     ](https://wordpress.org/support/plugin/prismatic/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/prismatic/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/prismatic/reviews/)

## Colaboradores

 *   [ Jeff Starr ](https://profiles.wordpress.org/specialk/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/prismatic/)

## Donar

¿Te gustaría apoyar el avance de este plugin?

 [ Donar para este plugin ](https://monzillamedia.com/donate.html)