dmmsoft/yii2-kindeditor

KindEditor Widget for Yii2

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Language:JavaScript

Type:yii2-extension

dev-master 2014-12-08 09:26 UTC

This package is not auto-updated.

Last update: 2024-05-07 00:26:24 UTC


README

KindEditor Widget for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist sailinghang/yii2-kindeditor "*"

or add

"sailinghang/yii2-kindeditor": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \sailinghang\kindeditor\KindEditorWidget::widget([
    'name' => 'content',
    'options' => [], // html attributes
    'clientOptions' => [
        'width' => '680px',
        'height' => '350px',
        'themeType' => 'default', // optional: default, simple, qq
        'langType' => 'zh_CN', // optional: ar, en, ko, zh_CN, zh_TW
        ...
    ],
]); ?>

or use with a model:

<?= \sailinghang\kindeditor\KindEditorWidget::widget([
    'model' => $model,
    'attribute' => 'content',
    'options' => [], // html attributes
    'clientOptions' => [
        'width' => '680px',
        'height' => '350px',
        'themeType' => 'default', // optional: default, simple, qq
        'langType' => 'zh_CN', // optional: ar, en, ko, zh_CN, zh_TW
        ...
    ],
]); ?>

For full details on usage, see the documentation.