sailinghang / yii2-kindeditor
KindEditor Widget for Yii2
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-12-31 18:36:42 UTC
README
KindEditor Widget for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist sailinghang/yii2-kindeditor "*"
or add
"sailinghang/yii2-kindeditor": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= \sailinghang\kindeditor\KindEditorWidget::widget([ 'name' => 'content', 'options' => [], // html attributes 'clientOptions' => [ 'width' => '680px', 'height' => '350px', 'themeType' => 'default', // optional: default, simple, qq 'langType' => 'zh_CN', // optional: ar, en, ko, zh_CN, zh_TW ... ], ]); ?>
or use with a model:
<?= \sailinghang\kindeditor\KindEditorWidget::widget([ 'model' => $model, 'attribute' => 'content', 'options' => [], // html attributes 'clientOptions' => [ 'width' => '680px', 'height' => '350px', 'themeType' => 'default', // optional: default, simple, qq 'langType' => 'zh_CN', // optional: ar, en, ko, zh_CN, zh_TW ... ], ]); ?>
For full details on usage, see the documentation.