Yii2 ckeditor widget ¶
Full code @ github ¶
Installation ¶
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require edofre/yii2-ckeditor "@dev"
or add
"edofre/yii2-ckeditor": "@dev"
to the `
require`
section of your composer.json
file.
Usage ¶
ActiveForm usage with a model ¶
<?= $form->field($model, 'body')->widget(\edofre\ckeditor\CKEditor::className(), [
'editorOptions' => [
'language' => 'nl',
],
]) ?>
Usage without model ¶
<?= \edofre\ckeditor\CKEditor::widget([
'name' => 'content',
'editorOptions' => [
'height' => '400px',
],
]) ?>
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.