All Projects → BigKuCha → Yii2 Ueditor Widget

BigKuCha / Yii2 Ueditor Widget

UEditor for Yii2

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Yii2 Ueditor Widget

Yii2 Save Relations Behavior
Validate and save automatically related Active Record models.
Stars: ✭ 125 (-20.89%)
Mutual labels:  yii2
Yii2 Swagger
yii2 with swagger-php
Stars: ✭ 138 (-12.66%)
Mutual labels:  yii2
Jnoj
Jiangnan Online Judge
Stars: ✭ 151 (-4.43%)
Mutual labels:  yii2
Yii2 Rbac
RBAC Manager for Yii 2
Stars: ✭ 128 (-18.99%)
Mutual labels:  yii2
Yii2 Twig
Yii 2 Twig extension.
Stars: ✭ 130 (-17.72%)
Mutual labels:  yii2
Yii2 Stubs Generator
No more pain with autocomplete in PhpStorm.
Stars: ✭ 143 (-9.49%)
Mutual labels:  yii2
Yii2 Jui
Yii 2 JQuery UI extension.
Stars: ✭ 120 (-24.05%)
Mutual labels:  yii2
Yii2 Comments
Comments module for Yii2
Stars: ✭ 155 (-1.9%)
Mutual labels:  yii2
Yii2 Minimal
Yii 2 minimal application template
Stars: ✭ 133 (-15.82%)
Mutual labels:  yii2
Yii2 Assets Auto Compress
Automatic compilation of js + css + html
Stars: ✭ 147 (-6.96%)
Mutual labels:  yii2
Yii2 Date Picker Widget
Bootstrap DatePicker Widget for Yii2
Stars: ✭ 128 (-18.99%)
Mutual labels:  yii2
Yii2 Ace Admin
我的Yii2 Admin后台项目
Stars: ✭ 130 (-17.72%)
Mutual labels:  yii2
Awesome Yii2
Yii2 干货集
Stars: ✭ 1,800 (+1039.24%)
Mutual labels:  yii2
Cms
SkeekS CMS (Yii2)
Stars: ✭ 128 (-18.99%)
Mutual labels:  yii2
Yii2 Export
A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
Stars: ✭ 153 (-3.16%)
Mutual labels:  yii2
Craft
Composer starter project for Craft CMS
Stars: ✭ 122 (-22.78%)
Mutual labels:  yii2
Yii2 Json Api
Implementation of JSON API specification for the Yii framework
Stars: ✭ 139 (-12.03%)
Mutual labels:  yii2
Yii2 Workflow
A simple workflow engine for Yii2
Stars: ✭ 157 (-0.63%)
Mutual labels:  yii2
Yii2 Cms
YiiCMS - 基于 Yii2 的高度可定制化开源 CMS
Stars: ✭ 153 (-3.16%)
Mutual labels:  yii2
Yii2 Wx
这可能是yii2中最好用的微信SDK🔥🔥🔥
Stars: ✭ 148 (-6.33%)
Mutual labels:  yii2

百度UEditor

Latest Stable Version Total Downloads

安装

Either run

$ php composer.phar require kucha/ueditor "*"

or add

"kucha/ueditor": "*"

to the require section of your composer.json file.

应用

controller:

public function actions()
{
    return [
        'upload' => [
            'class' => 'kucha\ueditor\UEditorAction',
        ]
    ];
}

view:

echo \kucha\ueditor\UEditor::widget(['name' => 'xxxx']);

或者:

echo $form->field($model,'colum')->widget('kucha\ueditor\UEditor',[]);

说明

ueditor只支持2种语言,en-uszh-cn,默认跟随系统语言 Yii::$app->language,可以通过2种方式设置,1.修改系统语言,在main.php(高级版) 或者web.php(基础版)添加'language' => 'zh-CN',。2.实例化的时候配置语言选项,见下边配置

配置相关

编辑器相关配置,请在view 中配置,参数为clientOptions,比如定制菜单,编辑器大小等等,具体参数请查看UEditor官网文档

简单实例:

use \kucha\ueditor\UEditor;
echo UEditor::widget([
    'clientOptions' => [
        //编辑区域大小
        'initialFrameHeight' => '200',
        //设置语言
        'lang' =>'en', //中文为 zh-cn
        //定制菜单
        'toolbars' => [
            [
                'fullscreen', 'source', 'undo', 'redo', '|',
                'fontsize',
                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat',
                'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|',
                'forecolor', 'backcolor', '|',
                'lineheight', '|',
                'indent', '|'
            ],
        ]
]);
文件上传相关配置,请在controller中配置,参数为config,例如文件上传路径等;更多参数请参照 config.php (跟UEditor提供的config.json一样)

简单实例:

public function actions()
{
    return [
        'upload' => [
            'class' => 'kucha\ueditor\UEditorAction',
            'config' => [
                "imageUrlPrefix"  => "http://www.baidu.com",//图片访问路径前缀
                "imagePathFormat" => "/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}" //上传保存路径
                "imageRoot" => Yii::getAlias("@webroot"),
            ],
        ]
    ];
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].