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

ActiveYii2-extension

xinyeweb/yii2-highlight
=======================

yii2-highlight

03CSS

Since Jun 27Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-highlight
==============

[](#yii2-highlight)

yii2-highlight

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

[](#installation)

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

Either run

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

```

or add

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

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

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

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

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

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

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

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

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

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/38ec5021ede5f92c4c582206f421d3b379498fe0c58435d3ba714f0e5a72ddde?d=identicon)[hotarzhang](/maintainers/hotarzhang)

---

Top Contributors

[![hoterzhang](https://avatars.githubusercontent.com/u/9025927?v=4)](https://github.com/hoterzhang "hoterzhang (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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