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.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.