zertex/yii2-zx-ckeditor

CKEditor for Yii2。

安装: 13

依赖: 0

建议者: 0

安全: 0

星星: 1

关注者: 1

分支: 0

开放问题: 0

类型:yii2-extension

1.0.0 2017-03-07 10:49 UTC

This package is not auto-updated.

Last update: 2024-09-20 22:07:51 UTC


README

CKEditor —— 网站所见即所得编辑器。

安装

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

运行以下命令:

composer require zertex/yii2-zx-ckeditor "dev-master"

或添加以下内容到您的应用程序的 composer.json 文件中的 require 部分:

"zertex/yii2-zx-ckeditor" : "dev-master"

使用方法

use zertex\ckeditor\CKEditor;
use yii\helpers\Html;

CKEditor::widget([
    'editorOptions' => [
        'preset' => 'full', // basic, standard, full - feature not required
        'inline' => false, // false by default
    ]
]);

## ActiveForm

echo $form->field($post, 'content')->widget(CKEditor::className(),[
    'editorOptions' => [
        'preset' => 'full',
        'inline' => false,
    ],
]);

链接

CKEditor Api - http://docs.ckeditor.com/ CKEditor 示例 - http://nightly.ckeditor.com/