djfly / kindeditor
kindeditor for yii2.
Installs: 198
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-widget
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-09 16:58:28 UTC
README
kindeditor for yii2
#Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require djfly/kindeditor "*"
or add
"djfly/kindeditor": "*"
to the require section of your composer.json
file.
and download kindeditor put it into assets dir, Because there is no composer package for kindeditor
#Usage
<?=\djfly\kindeditor\KindEditor::widget([
'id' => 'post-content',
'model' => $model,
'attribute' => 'content',
'items' => [
'langType' => Yii::$app->language, // 'en' , 'zh-CN'
'height' => '300px',
'themeType' => 'simple',
'allowImageUpload' => true,
'allowFileManager' => true,
'uploadJson' => 'upload_json.php',
'fileManagerJson' => '../php/file_manager_json.php',
'items' => [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link',
]
],
])?>
#DOCUMENTATION
source https://github.com/kindsoft/kindeditor
official kindeditor http://kindeditor.net/