himiklab / yii2-ckeditor-widget
此包已被废弃,不再维护。没有建议的替代包。
基于 CKEditor 的 Yii2 WYSIWYG 编辑器小部件
此包尚未发布版本,信息较少。
README
基于 CKEditor 的 Yii2 WYSIWYG HTML 编辑器小部件。
安装
安装此扩展的首选方法是使用 composer。
将以下内容添加到应用程序的 composer.json
文件的 require 部分。如果您使用 "minimum-stability": "stable"
,请在此行之前添加
"himiklab/yii2-ckeditor-widget" : "*"
"ckeditor/ckeditor": "dev-full/stable"
使用方法
作为 ActiveForm 字段使用
use himiklab\ckeditor\CKEditor; <?= $form->field($model, 'text')->widget(CKEditor::className(), [ 'editorOptions' => ['height' => '500px'] ]) ?>
作为内联字段使用
use himiklab\ckeditor\CKEditor; <?= CKEditor::widget([ 'name' => 'comment', 'value' => 'Please write your comment', 'editorOptions' => ['height' => '500px'] ]) ?>