thejoshsmith / craft-prism-syntax-highlighting
A Craft CMS plugin for syntax highlighting with PrismJS.
Package info
Language:JavaScript
Type:craft-plugin
pkg:composer/thejoshsmith/craft-prism-syntax-highlighting
Fund package maintenance!
Requires
- php: ^8.2
- craftcms/cms: ^5.0.0
- verbb/base: ^3.0.20
Requires (Dev)
- prismjs/prism: ^1.16
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-02 00:44:37 UTC
README
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.