yii2-syntaxhighlighter SyntaxHighlighter extension for Yii 2

  1. Requirements
  2. Installation
  3. Usage
  4. Resources

Requirements

This extension requires Yii 2

Installation

You can add this extension to your Yii 2 project by adding the following line to your composer.json file in the list of requirements:

[javascript]
"giovdk21/yii2-syntaxhighlighter": "dev-master"

Usage

use giovdk21\yii2SyntaxHighlighter\SyntaxHighlighter as SyntaxHighlighter;
SyntaxHighlighter::begin(['brushes' => ['php']]);
echo SyntaxHighlighter::getBlock('some code', 'php');
SyntaxHighlighter::end();

Note: this is still a work in progress, the widget will be improved in the upcoming weeks.

Resources

0 0
5 followers
0 downloads
Yii Version: Unknown
License: MIT
Category: User Interface
Developed by: Giovanni D.
Created on: Feb 16, 2014
Last updated: 10 years ago

Related Extensions