yii2-extensions/summernote
Composer 安装命令:
composer require yii2-extensions/summernote
包简介
Summernote - Super Simple WYSIWYG editor.
README 文档
README
Summernote - Super Simple WYSIWYG editor.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --dev --prefer-dist yii2-extensions/summernote
or add
"yii2-extensions/summernote": "dev-main"
to the require-dev section of your composer.json file.
Usage
Name
use Yii2\Extensions\Summernote\Summernote; echo Summernote::widget( [ 'name' => 'content', 'value' => $value, 'config' => [ 'focus' => true, 'height' => 200, 'maxHeight' => null, 'minHeight' => null, 'placeholder' => 'Write here...', ], ] );
Active Field
use Yii2\Extensions\Summernote\Summernote; echo $form ->field($model, 'content') ->widget( Summernote::class, [ 'config' => [ 'focus' => true, 'height' => 200, 'maxHeight' => null, 'minHeight' => null, 'placeholder' => 'Write here...', ], ] );
Properties of the widget
| Property | Type | Description | Default |
|---|---|---|---|
config |
array |
The configuration of the widget. | [] |
When YII_ENV is set to
devortest, the widget will load the non-minified version of the JavaScript files, otherwise it will load the minified version.
Quality code
Support versions Yii2
Testing
Check the documentation testing to learn about testing.
Our social networks
License
The MIT License. Please see License File for more information.
统计信息
- 总下载量: 213
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: mit
- 更新时间: 2023-11-18