grenhaz/yii2-highlight

Yii2 Highlight wrapper

Maintainers

Package info

github.com/grenhaz/yii2-highlight

Language:CSS

Type:yii2-extension

pkg:composer/grenhaz/yii2-highlight

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2018-03-17 13:02 UTC

This package is not auto-updated.

Last update: 2026-03-01 13:31:28 UTC


README

See: https://highlightjs.org/

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist grenhaz/yii2-highlight

or add

"grenhaz/yii2-highlight": "~1.0.0"

to the require section of your composer.json.

Basic Usage

use yii\helpers\Json;
use grenhaz\highlight\HighlightWidget;

echo HighlightWidget::widget([
    "language" => "json",
    "code" => Json::encode( Json::decode( $data ), JSON_PRETTY_PRINT )
]);

Example

Example