PHPackages                             nezhelskoy/yii2-highlight - 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. nezhelskoy/yii2-highlight

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

nezhelskoy/yii2-highlight
=========================

Yii2 highlight.js extension

v1.2.8(9y ago)1532.2k↑492.9%9BSD-3-ClausePHPPHP &gt;=5.4.0

Since Aug 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nezhelskoy/yii2-highlight)[ Packagist](https://packagist.org/packages/nezhelskoy/yii2-highlight)[ RSS](/packages/nezhelskoy-yii2-highlight/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (1)Versions (23)Used By (0)

Yii2 highlight.js extension
===========================

[](#yii2-highlightjs-extension)

### Installation

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/).

Either run

```
php composer.phar require --prefer-dist nezhelskoy/yii2-highlight "*"

```

Or add

```
"nezhelskoy/yii2-highlight": "*"

```

to the require section of your `composer.json` file.

### Usage

[](#usage)

In your view script register asset:

```
nezhelskoy\highlight\HighlightAsset::register($this);
```

And manage content, as described in original [highlight.js documentation](https://highlightjs.org/usage/):

```
...
```

You can override style in your config file, e.g. `config/web.php`:

```
    'components' => [
        ...
        'assetManager' => [
            'bundles' => [
                'nezhelskoy\highlight\HighlightAsset' => [
                    'css' => ['dist/styles/zenburn.css'],
                ],
            ]
        ],
        ...
    ],
```

Example of custom cofiguraton of `selector` or `options` properties

```
    'components' => [
        ...
        'assetManager' => [
            'bundles' => [
                'nezhelskoy\highlight\HighlightAsset' => [
                    'selector' => '.is-highlighted',
                    'options' => [
                        'classPrefix' => 'custom-',
                        'useBR' => true,
                    ],
                    'css' => ['dist/styles/zenburn.css'],
                ],
            ]
        ],
        ...
    ],
```

Using of custom build, located in `/js/highlight`, for example

```
    'components' => [
        ...
        'assetManager' => [
            'bundles' => [
                'nezhelskoy\highlight\HighlightAsset' => [
                    'sourcePath' => null,
                    'css' => ['/js/highlight/styles/zenburn.css'],
                    'js' => ['/js/highlight/highlight.pack.js'],
                ],
            ]
        ],
        ...
    ],
```

License
-------

[](#license)

yii2-highlight is released under the BSD License. See [LICENSE.md](https://github.com/nezhelskoy/yii2-highlight/blob/master/LICENSE.md) file for details.

Links
-----

[](#links)

The official site for the Highlight.js library is at .

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~46 days

Recently: every ~107 days

Total

21

Last Release

3404d ago

Major Versions

v0.2.2 → v1.0.02015-02-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2945846?v=4)[Dmitry А. Nezhelskoy](/maintainers/nezhelskoy)[@nezhelskoy](https://github.com/nezhelskoy)

---

Top Contributors

[![nezhelskoy](https://avatars.githubusercontent.com/u/2945846?v=4)](https://github.com/nezhelskoy "nezhelskoy (10 commits)")[![Niremizov](https://avatars.githubusercontent.com/u/3479186?v=4)](https://github.com/Niremizov "Niremizov (4 commits)")

---

Tags

extensionphpyii2highlighthighlight.jsyii2

### Embed Badge

![Health badge](/badges/nezhelskoy-yii2-highlight/health.svg)

```
[![Health](https://phpackages.com/badges/nezhelskoy-yii2-highlight/health.svg)](https://phpackages.com/packages/nezhelskoy-yii2-highlight)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[scrivo/highlight.php

Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js

71346.6M111](/packages/scrivo-highlightphp)[bizley/quill

Quill editor implementation for Yii 2.

65143.6k5](/packages/bizley-quill)

PHPackages © 2026

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