kuakling/yii2-keditor
Composer 安装命令:
composer require kuakling/yii2-keditor
包简介
CKEditor and KCFinder
关键字:
README 文档
README
CKEditor and KCFinder Keditor
CKEditor and KCFinder
Installation
The preferred way to install this extension is through composer.
Either run
composer require kuakling/yii2-keditor "*"
or add
"kuakling/yii2-keditor": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
Convert textarea to CKEditor
<?php //CKEditor echo $form->field($model, 'detail')->widget( \kuakling\keditor\CKEditor::className(), [ 'uploadDir' => '/var/www/public_html/UserFiles', 'uploadURL' => '/UserFiles/', 'filemanager'=>true, //true = enabled kcfinder, false = disabled kcfinder 'preset'=>'full' //toolbar -> basic, standard, full ] )->label(false); ?>
<?php //TinyMce echo $form->field($model, 'detail')->widget( \kuakling\keditor\TinyMce::className(), [ 'uploadDir' => '/var/www/public_html/UserFiles', 'uploadURL' => '/UserFiles/', 'enableFilemanager' => true, 'folderName' => ['file'=> 'File', 'image'=>'Image', 'media'=>'Media'], ] ); ?>
Using textinput choose file in server and return filename to textinput by CKFinder
<?php echo $form->field($model, 'icon')->widget( \kuakling\keditor\KCFinderTextInput::className(), [ 'dir' => 'icons' //sub directory of kcfinder upload directory ] )->label(false); ?>
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2015-08-26