zertex / yii2-zx-ckeditor
CKEditor for Yii2。
1.0.0
2017-03-07 10:49 UTC
Requires
- ckeditor/ckeditor: ^4.5
- yiisoft/yii2: ^2.0
This package is not auto-updated.
Last update: 2024-09-20 22:07:51 UTC
README
CKEditor —— 网站所见即所得编辑器。
安装
通过 composer 安装此扩展是首选方式。
运行以下命令:
composer require zertex/yii2-zx-ckeditor "dev-master"
或添加以下内容到您的应用程序的 composer.json
文件中的 require 部分:
"zertex/yii2-zx-ckeditor" : "dev-master"
使用方法
use zertex\ckeditor\CKEditor; use yii\helpers\Html; CKEditor::widget([ 'editorOptions' => [ 'preset' => 'full', // basic, standard, full - feature not required 'inline' => false, // false by default ] ]); ## ActiveForm echo $form->field($post, 'content')->widget(CKEditor::className(),[ 'editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]);
链接
CKEditor Api - http://docs.ckeditor.com/ CKEditor 示例 - http://nightly.ckeditor.com/