stkevich/yii2-ckeditor5

适用于yii2框架的ckeditor 5小部件

dev-master 2019-09-19 17:11 UTC

This package is auto-updated.

Last update: 2024-09-18 23:51:45 UTC


README

更多详细信息请访问网站 https://docs.ckeditor.com/ckeditor5/latest/builds/

安装

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

运行以下命令之一:

composer require --prefer-dist stkevich/yii2-ckeditor5 "*"

或者

"stkevich/yii2-ckeditor5": "*"

将以下内容添加到你的 composer.json 文件的 require 部分。

使用方法

扩展安装后,只需在代码中使用它即可

use \stkevich\ckeditor5\EditorClassic;
...
$form->field($model, 'fieldName')->widget(EditorClassic::className(), []);

你可以编辑工具栏或上传Url

$form->field($model, 'fieldName')->widget(EditorClassic::className(), 
    [
        'toolbar' => ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote'],
        'uploadUrl' => '/someUpload.php',
    ]
);

更多信息请参阅 指南