Prism.js Gutenberg Block

Shared by

Use Prism.js in WordPress with the Prism.js Gutenberg block plugin. Uses the existing code block for easy & semantic integration.

Prism.js Gutenberg Block

Prism.js is one of the best & most light-weight code syntax highlighters out there. Surprisingly (at least at the time of writing this), there’s not a WordPress Prism.js Gutenberg block plugin available on

Luckily, Jim Schofield put together one on GitHub and is easily customizable for your specific needs (i.e. load only what you need). He also did a great write-up on how he accomplished this by showing how to create custom Gutenberg blocks.

Join the conversation.

Your email address will not be published. Required fields are marked *

All comments posted on 'Prism.js Gutenberg Block' are held for moderation and only published when on topic and not rude. Get a gold star if you actually read & follow these rules.

You may write comments in Markdown. This is the best way to post any code, inline like `<div>this</div>` or multiline blocks within triple backtick fences (```) with double new lines before and after.

Want to tell me something privately, like pointing out a typo or stuff like that? Contact Me.