PHPackages                             cyr/ueditor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cyr/ueditor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cyr/ueditor
===========

editoru

0101JavaScript

Since Feb 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/justzheng/ueditor)[ Packagist](https://packagist.org/packages/cyr/ueditor)[ RSS](/packages/cyr-ueditor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

百度UEditor
=========

[](#百度ueditor)

[![Latest Stable Version](https://camo.githubusercontent.com/4884e3bcf7f0c4f33b686f71ecde13f37a407dafa798ead9099e276e9cd0b301/68747470733a2f2f706f7365722e707567782e6f72672f6b756368612f75656469746f722f762f737461626c65)](https://packagist.org/packages/kucha/ueditor) [![Total Downloads](https://camo.githubusercontent.com/ebfad9ca39f8062242e44530e9c8974d05f813fd0e5ff1b9638449e4e8b52300/68747470733a2f2f706f7365722e707567782e6f72672f6b756368612f75656469746f722f646f776e6c6f616473)](https://packagist.org/packages/kucha/ueditor)

### 安装

[](#安装)

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-us`和`zh-cn`,默认跟随系统语言 `Yii::$app->language`,可以通过2种方式设置，1.修改系统语言，在`main.php`(高级版) 或者`web.php`(基础版)添加`'language' => 'zh-CN',`。2.实例化的时候配置语言选项，见下边配置

### 配置相关

[](#配置相关)

##### 编辑器相关配置，请在`view` 中配置，参数为`clientOptions`，比如定制菜单，编辑器大小等等，具体参数请查看[UEditor官网文档](http://fex-team.github.io/ueditor/)。

[](#编辑器相关配置请在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](https://github.com/BigKuCha/yii2-ueditor-widget/blob/master/config.php) (跟UEditor提供的config.json一样)

[](#文件上传相关配置请在controller中配置参数为config例如文件上传路径等更多参数请参照-configphp-跟ueditor提供的configjson一样)

简单实例:

```
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"),
            ],
        ]
    ];
}
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9ea7ebac3ea4022f3e2e288f38195c4e1f07b0fdd63dd6f60fd08f7d8612ad1?d=identicon)[justzheng](/maintainers/justzheng)

---

Top Contributors

[![justzheng](https://avatars.githubusercontent.com/u/23428876?v=4)](https://github.com/justzheng "justzheng (2 commits)")

### Embed Badge

![Health badge](/badges/cyr-ueditor/health.svg)

```
[![Health](https://phpackages.com/badges/cyr-ueditor/health.svg)](https://phpackages.com/packages/cyr-ueditor)
```

###  Alternatives

[websharks/html-compressor

Combines &amp; compresses CSS/JS/HTML code.

407.1k1](/packages/websharks-html-compressor)[limewell/laravel-make-extender

This package helps to generate and autoload custom helpers, It can generate multilevel helpers in the context of the directory.

366.8k](/packages/limewell-laravel-make-extender)[linkorb/autotune

Tune your autoloader

177.0k17](/packages/linkorb-autotune)[jayanka/patch-manager

A magento extension to maintain data patches

232.4k](/packages/jayanka-patch-manager)[tapp/filament-progress-bar-column

Add beautiful, color-coded progress bars to your Filament table columns. Perfect for inventory, tasks, storage, and any progress metrics without writing custom views.

124.5k](/packages/tapp-filament-progress-bar-column)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
