edofre / yii2-ckeditor
Yii2 的 ckeditor 小部件
V1.0.2
2018-01-07 12:15 UTC
Requires
- php: >=5.5.0
- bower-asset/ckeditor: ~4.8.0
- yiisoft/yii2: *
- yiisoft/yii2-jui: *
This package is not auto-updated.
Last update: 2024-09-24 04:09:58 UTC
README
安装
安装此扩展的首选方法是使用 Composer。
要安装,可以运行
$ php composer.phar require edofre/yii2-ckeditor "V1.0.2"
或将其添加到您的 composer.json
文件的 require
部分:
"edofre/yii2-ckeditor": "V1.0.2"
to the require
section of your composer.json
file.
使用方法
与模型一起使用 ActiveForm
<?= $form->field($model, 'body')->widget(\edofre\ckeditor\CKEditor::className(), [ 'editorOptions' => [ 'language' => 'nl', ], ]) ?>
无模型使用
<?= \edofre\ckeditor\CKEditor::widget([ 'name' => 'content', 'editorOptions' => [ 'height' => '400px', ], ]) ?>