mve-it-solutions/yii2-google-code-prettify
最新稳定版本:0.0.1
Composer 安装命令:
composer require mve-it-solutions/yii2-google-code-prettify
包简介
Yii2 Code syntax highlighter using Google Code Prettify
README 文档
README
Yii2 Code syntax highlighter using Google Code Prettify
Installation
Composer
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mve-it-solutions/yii2-google-code-prettify "*"
or add
"mve-it-solutions/yii2-google-code-prettify": "*"
to the require section of your composer.json file.
Usage
To use this extension add below to your main layout:
\mveitsolutions\googlecodeprettify\GoogleCodePrettifyAsset::register($this, ['style' => 'simple', 'lineNums' => true, 'autoAddPreClasses' => true]);
- This will use the style defined by simple.css
- This will add linenumbers on every line in the pre (code) block
- This will auto add the classes prettyprint and linenums to every pre tag
AssetBundle Register Options
style Google Code Prettify Skin Options: desert, doxy, prettify, sons-of-obsidian, sunburst or simple
lineNums Put line numbers on every line Options: true or false
autoAddPreClasses Automatically add classes to every pre tag Options: true or false
License
yii2-google-code-prettify is released under the MIT License. See LICENSE.md file for details.
统计信息
- 总下载量: 101.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-29