skarbnica/yii2-ckeditor-widget

自定义ckeditor

0.1.9 2018-11-05 07:09 UTC

This package is auto-updated.

Last update: 2024-09-05 21:03:34 UTC


README

自定义ckeditor

安装

安装此扩展的首选方法是通过composer

运行以下命令:

php composer.phar require --prefer-dist skarbnica/yii2-ckeditor-widget "*"

或者在您的composer.json文件的require部分添加以下内容:

"skarbnica/yii2-ckeditor-widget": "*"

使用方法

扩展安装完成后,只需在代码中通过以下方式使用它:

<?=$form->field($model, "attribute")->widget(\skarbnica\ckeditor\CKEditor::class, [
        'options' => ['class' => 'ckeditor'],
        'clientOptions' => ['filebrowserUploadUrl' => '/url/to/upload']
    ]) ?>