Search by

thejoshsmith / craft-prism-syntax-highlighting

thejoshsmith

A Craft CMS plugin for syntax highlighting with PrismJS.

Package info

github.com/verbb/prism

Documentation

Language:JavaScript

Type:craft-plugin

pkg:composer/thejoshsmith/craft-prism-syntax-highlighting

Fund package maintenance!

verbb

Statistics

Installs: 4 714

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

4.0.9 2026-11-01 11:01 UTC

README

Prism icon

Prism for Craft CMS

Prism is a Craft CMS plugin that gives Craft authors a code field that looks and behaves like code. Edit with live syntax highlighting and useful keyboard controls, with the language and theme set for each field, then output the stored source in your templates.

Pick the language for each field and see syntax highlighting as the author types. Line numbers, indentation shortcuts, undo and redo, configurable tab width, and editor height make the field suitable for more than a one-line snippet.

Features

  • See language-aware syntax colour while editing the value.
  • Highlight any of the 176 PrismJS languages, including HTML, CSS, JavaScript, Twig, PHP, JSON and YAML.
  • Give each field one of eight bundled PrismJS themes.
  • Show line numbers and set the tab width and editor height for longer examples.
  • Indent and undo without fighting a plain textarea.

Documentation

Visit the Prism Plugin page for all documentation, guides, pricing and developer resources.

Credit & Thanks

Originally created by Josh Smith me@joshsmith.dev.

Support

Get in touch with us via the Prism Support page or by creating a GitHub issue.

Sponsor

Prism is licensed under the MIT license, so it will always be free and open source. If you'd like to support it anyway, you can sponsor its development.

Verbb