cliff363825/yii2-kindeditor KindEditor Widget for Yii2

kindeditor

KindEditor Widget for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"cliff363825/yii2-kindeditor": "*"

to the require section of your composer.json file.

Usage

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

1) Without any model:

<?= \cliff363825\kindeditor\KindEditorWidget::widget([
    'name' => 'content',
    'options' => [], // html attributes
    'clientOptions' => [
        'width' => '680px',
        'height' => '350px',
        'themeType' => 'default', // optional: default, simple, qq
        'langType' => \cliff363825\kindeditor\KindEditorWidget::LANG_TYPE_ZH_CN, // optional: ar, en, ko, ru, zh-CN, zh-TW
        ...
    ],
]); ?>

2) With an model:

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

Notice

  • In version v1.0.5 or later, the language packages was renamed. zh_CN -> zh-CN, zh_TW -> zh-TW.

You may have to modify your code in your project if KindEditorWidget->clientOptions->langType was set zh_CN or zh_TW.

说简单点,就是你要把langType是zh_CNzh_TW对应改成zh-CNzh-TW

  • The default value of KindEditorUploadAction->savePath is changed to uploads now, NOT @webroot/uploads.

Add a new property basePath and the default value is @webroot.

  • Remove property KindEditorUploadAction->saveUrl.

Add a new property baseUrl and the default value is @web.

see the change log

Documentation

For full details on usage, see the documentation.

Changelog

Yii2 KindEditor Change Log

v1.1.1

  • remove htm, html unsafe file extensions from KindEditorUploadAction.

v1.1.0

  • Fixed asset dependents.
  • Update KindEditor version from 4.1.11 to 4.1.12.see the change log.

v1.0.5

  • Fixed mkdir() mode 0755.
  • Remove unnecessary code.
  • Update KindEditor version from 4.1.10 to 4.1.11.see the change log.
  • Waring: Language packages standardization. zh_CN -> zh-CN, zh_TW -> zh-TW. 改善: 语言包文件名标准化,zh_CN -> zh-CN, zh_TW -> zh-TW。
  • For the future, please use KindEditorWidget::LANG_TYPE_ZH_CN or LANG_TYPE_ZH_TW to avoid this problem.
  • The default value of KindEditorUploadAction->savePath is changed to uploads now, NOT @webroot/uploads.
  • Add a new property basePath and the default value is @webroot.
  • Remove property KindEditorUploadAction->saveUrl.
  • Add a new property baseUrl and the default value is @web.

v1.0.4

  • Add comments.
  • Split KindEditorBaseController to actions KindEditorUploadAction,KindEditorFileManagerAction
  • KindEditorBaseController is deprecated and will be removed in the future.

1.0.3

  • The name of KindEditorBaseController is too long, use KindEditorController instead.

1.0.2

  • Bug #1: Fixed 400 bad request

1.0.1

  • Update README.md

1.0.0

  • Project init.

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v1.1.0 is the latest of 7 releases



MIT license
Stats
8 github stars & 6 github forks
0 downloads in the last day
0 downloads in the last 30 days
935 total downloads