PHPackages                             lindemannrock/craft-code-highlighter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lindemannrock/craft-code-highlighter

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

lindemannrock/craft-code-highlighter
====================================

Lightweight syntax highlighting for Craft CMS using Prism.js

5.8.1(2w ago)0421proprietaryPHPPHP ^8.2CI passing

Since Nov 1Pushed 2w agoCompare

[ Source](https://github.com/LindemannRock/craft-code-highlighter)[ Packagist](https://packagist.org/packages/lindemannrock/craft-code-highlighter)[ RSS](/packages/lindemannrock-craft-code-highlighter/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (12)Versions (13)Used By (1)

[![Code Highlighter](docs/images/hero.webp)](docs/images/hero.webp)

Code Highlighter for Craft CMS
==============================

[](#code-highlighter-for-craft-cms)

[![Latest Version](https://camo.githubusercontent.com/89d890bb8a3ae3e5f01bc11695f93bc669f00ea6588d43bd6c9c12a80e7ad8b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696e64656d616e6e726f636b2f63726166742d636f64652d686967686c6967687465722e737667)](https://packagist.org/packages/lindemannrock/craft-code-highlighter)[![Craft CMS](https://camo.githubusercontent.com/c176c7ad994b4d577c758871323311a223477bd0cd427c40a8472fd0cad04992/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e302b2d6f72616e67652e737667)](https://craftcms.com/)[![PHP](https://camo.githubusercontent.com/5fe05c705bf034839bda7651781e4d0a9d42f4a840478ca5e343873a0361bb89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/c76088a6ce24bdc56f1bb115344d58726b7fd5e80226a174c97ecf73cb683bcd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c696e64656d616e6e726f636b2f63726166742d636f64652d686967686c6967687465722e737667)](LICENSE)

Professional syntax highlighting for Craft CMS using Prism.js. Perfect for documentation sites, technical blogs, and any site displaying code.

License
-------

[](#license)

This is a commercial plugin licensed under the [Craft License](https://craftcms.github.io/license/). It will be available on the [Craft Plugin Store](https://plugins.craftcms.com) soon. See [LICENSE.md](LICENSE.md) for details.

⚠️ Pre-Release
--------------

[](#️-pre-release)

This plugin is in active development and not yet available on the Craft Plugin Store. Features and APIs may change before the initial public release.

Features
--------

[](#features)

- **Code field with a real editor** — live syntax highlighting in the Control Panel, with line numbers, tab/indent handling, undo/redo, and an optional in-editor language switcher
- **~177 languages** — Prism's full language set, bundled and loaded on demand (with dependency resolution); choose which appear in field dropdowns
- **25 themes** — from classic Prism themes to Dracula, Nord, One Dark, VS Code Dark+ and more; set one plugin-wide or override it per page
- **Highlighting extras** — line numbers, copy-to-clipboard button, matching-brace highlighting, and inline CSS colour swatches
- **Twig API** — print a Code field, re-render with overrides, or highlight any string with the `|highlight` / `|prism` filters
- **Integration trait** — let other plugins highlight code with graceful fallback when this plugin isn't installed
- **Bundled &amp; offline** — Prism core, all languages, and all themes are served from the plugin's own assets (no CDN)
- **CSS-variable theming** — restyle the wrapper and copy button without overriding selectors
- **12 languages** — Control-Panel UI translated out of the box

Requirements
------------

[](#requirements)

- Craft CMS 5.0 or greater
- PHP 8.2 or greater

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require lindemannrock/craft-code-highlighter
```

```
php craft plugin/install code-highlighter
```

### Using DDEV

[](#using-ddev)

```
ddev composer require lindemannrock/craft-code-highlighter
```

```
ddev craft plugin/install code-highlighter
```

Documentation
-------------

[](#documentation)

Full documentation is available in the [docs](docs/) folder.

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/LindemannRock/craft-code-highlighter/issues)
- **Email**:

Credits
-------

[](#credits)

- Uses [Prism.js](https://prismjs.com/) for syntax highlighting (MIT License)
- Uses [bililiteRange](https://github.com/dwachss/bililiteRange) for contenteditable handling (MIT License)

License
-------

[](#license-1)

This plugin is licensed under the [Craft License](https://craftcms.github.io/license/). See [LICENSE.md](LICENSE.md) for details.

---

Developed by [LindemannRock](https://lindemannrock.com)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance97

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Total

11

Last Release

16d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/81223527?v=4)[Lindemann](/maintainers/bhlindemann)[@bhlindemann](https://github.com/bhlindemann)

---

Top Contributors

[![bhlindemann](https://avatars.githubusercontent.com/u/81223527?v=4)](https://github.com/bhlindemann "bhlindemann (87 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

cmsprismCraftcraftcmscraft-pluginsyntax-highlightingCode highlightingPrismjs

### Embed Badge

![Health badge](/badges/lindemannrock-craft-code-highlighter/health.svg)

```
[![Health](https://phpackages.com/badges/lindemannrock-craft-code-highlighter/health.svg)](https://phpackages.com/packages/lindemannrock-craft-code-highlighter)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)[verbb/events

A full-featured plugin for event management and ticketing.

2311.9k](/packages/verbb-events)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
