masihfathi / yii2-ckeditor
yii2 ckeditor
1.4
2017-10-02 15:28 UTC
Requires
- yiisoft/yii2: ~2.0.0
README
yii2 ckeditor
安装
更新 MihailDev/yii2-ckeditor 包的 ckeditor 并添加 bidi 插件。安装此扩展的首选方法是使用 composer。
可以运行
composer require masihfathi/yii2-ckeditor "1.4"
或者添加
"masihfathi/yii2-ckeditor": "1.4"
到你的 composer.json
文件的 require 部分。
使用
一旦安装了扩展,只需在代码中使用它即可
use mihaildev\ckeditor\CKEditor; use yii\helpers\Html; CKEditor::widget([ 'editorOptions' => [ 'preset' => 'full', //basic, standard, full 'inline' => false, //false ] ]); //ActiveForm echo $form->field($post, 'content')->widget(CKEditor::className(),[ 'editorOptions' => [ 'preset' => 'full', //basic, standard, full 'inline' => false, //false ], ]);