unimodern / yii2-ckeditor
Yii2 widget for ckeditor
V2.0.2
2016-06-20 15:01 UTC
Requires
- php: >=5.5.0
- ckeditor/ckeditor: *
- yiisoft/yii2: *
- yiisoft/yii2-jui: *
This package is not auto-updated.
Last update: 2024-09-18 18:56:23 UTC
README
免责声明
这个是从 Edofre/yii2-ckeditor 分支出来的,以发布稳定版本
安装
安装此扩展的首选方式是通过 composer。
要安装,可以运行
$ php composer.phar require unimodern/yii2-ckeditor "@dev"
或者将以下内容添加到您的 composer.json
文件的 require
部分:
"unimodern/yii2-ckeditor": "@dev"
使用方法
使用模型 ActiveForm 的方法
<?= $form->field($model, 'body')->widget(\unimodern\ckeditor\CKEditor::className(), [ 'editorOptions' => [ 'language' => 'nl', ], ]) ?>
无模型使用方法
<?= \unimodern\ckeditor\CKEditor::widget([ 'name' => 'content', 'editorOptions' => [ 'height' => '400px', ], ]) ?>