CKEditor widget for Yii2.
Renders a CKEditor WYSIWYG text editor plugin widget.
The preferred way to install this extension is through composer.
php composer.phar require "skeeks/yii2-widget-ckeditor" "*"
"skeeks/yii2-widget-ckeditor" : "*"
to the require section of your application's
This widget works with default's
dev-full/stable branch of CKEditor, with a set of plugins and skins. If you wish to
configure a different skins or plugins that the one proposed, you will have to download them separately and configure
clientOptions attribute accordingly.
The library comes with two widgets:
CKEditorInline. One is for classic edition and the other for inline
Using a model with a basic preset:
use skeeks\widget\ckeditor\CKEditor; <?= $form->field($model, 'text')->widget(CKEditor::className(), [ 'options' => ['rows' => 6], 'preset' => 'basic' ]) ?>
Using inline edition with basic preset:
use skeeks\widget\ckeditor\CKEditorInline; <?php CKEditorInline::begin(['preset' => 'basic']);?> This text can be edited now :) <?php CKEditorInline::end();?>
Please, check the CKEditor plugin site documentation for further information about its configuration options.
Web development has never been so fun!