PHPackages                             ibunao/yii2-weditor - 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. ibunao/yii2-weditor

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

ibunao/yii2-weditor
===================

wangEditor for yii

v0.0.3(8y ago)2120PHPPHP &gt;=5.2

Since May 25Pushed 8y agoCompare

[ Source](https://github.com/echo-ding/yii2-wang-editor)[ Packagist](https://packagist.org/packages/ibunao/yii2-weditor)[ Docs](https://github.com/echo-ding/yii2-wang-editor)[ RSS](/packages/ibunao-yii2-weditor/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

Yii2 扩展-富文本编辑器（wangEditor）
==========================

[](#yii2-扩展-富文本编辑器wangeditor)

为yii2准备的简洁的wangEditor富文本编辑器插件 [![](https://camo.githubusercontent.com/3191c7dee5412d05158361612baef8e3261fb424307413302f71e4183963db77/687474703a2f2f696d67342e30376e657430312e636f6d2f75706c6f61642f696d616765732f323031352f30382f32382f313637343831303238303833303532312e706e67)](https://camo.githubusercontent.com/3191c7dee5412d05158361612baef8e3261fb424307413302f71e4183963db77/687474703a2f2f696d67342e30376e657430312e636f6d2f75706c6f61642f696d616765732f323031352f30382f32382f313637343831303238303833303532312e706e67)

安装方法：
-----

[](#安装方法)

> 在yii站点根目录下执行 `omposer require ibunao/yii2-weditor`安装

> 如果安装中出现下面的错误

```
 Problem 1
    - sebastian/version 2.0.0 requires php >=5.6 -> your PHP version (5.5.12) does not satisfy that requirement.
    - sebastian/version 2.0.0 requires php >=5.6 -> your PHP version (5.5.12) does not satisfy that requirement.
    - sebastian/version 2.0.0 requires php >=5.6 -> your PHP version (5.5.12) does not satisfy that requirement.
    - Installation request for sebastian/version (locked at 2.0.0) -> satisfiable by sebastian/version[2.0.0].

```

> 可以通过 `composer require ibunao/yii2-weditor --ignore-platform-reqs` 安装命令

使用方法：
-----

[](#使用方法)

### 控制器

[](#控制器)

在将使用文本编辑器 `wangEditor` 的控制器中加入下面代码，用来接收图片

```
public function actions()
{
    return [
        'weditor' => [
            'class' => 'weditor\WeditorAction',
            'config'=>[
                //上传图片配置
                //图片保存路径,及名字
                'pathFormat' => "/imagebiubiu/{yyyy}{mm}{dd}/{time}{rand:6}",
                /* 上传保存路径,可以自定义保存路径和文件名格式 */
                /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
			    /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
			    /* {time} 会替换成时间戳 */
			    /* {yyyy} 会替换成四位年份 */
			    /* {yy} 会替换成两位年份 */
			    /* {mm} 会替换成两位月份 */
			    /* {dd} 会替换成两位日期 */
			    /* {hh} 会替换成两位小时 */
			    /* {ii} 会替换成两位分钟 */
			    /* {ss} 会替换成两位秒 */
            ]
        ],
    ];
}

```

### 使用编辑器小部件

[](#使用编辑器小部件)

第一种调用方式：

在对应的渲染页面，即views下的页面中

```

```

第二种调用方式： 结合form表单使用

```

				//设置宽高

```

> 推荐使用第二种方式

> 注意，宽高会受父元素的影响 ,比如``

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3275d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/646c0b45e69fbc5fc22a0524ac611f747dd4a7de5edb59a30f832f54ca862a07?d=identicon)[echo-ding](/maintainers/echo-ding)

---

Top Contributors

[![Ibunao](https://avatars.githubusercontent.com/u/18415240?v=4)](https://github.com/Ibunao "Ibunao (16 commits)")[![echo-ding](https://avatars.githubusercontent.com/u/27016702?v=4)](https://github.com/echo-ding "echo-ding (1 commits)")

---

Tags

editorwangEditoryiieditorweditor

### Embed Badge

![Health badge](/badges/ibunao-yii2-weditor/health.svg)

```
[![Health](https://phpackages.com/badges/ibunao-yii2-weditor/health.svg)](https://phpackages.com/packages/ibunao-yii2-weditor)
```

###  Alternatives

[froala/wysiwyg-editor

A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.

5.4k306.9k3](/packages/froala-wysiwyg-editor)[ckeditor/ckeditor

JavaScript WYSIWYG web text editor.

5234.2M76](/packages/ckeditor-ckeditor)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[unisharp/laravel-ckeditor

JavaScript WYSIWYG web text editor (for laravel).

377762.3k5](/packages/unisharp-laravel-ckeditor)[yajra/laravel-datatables-editor

Laravel DataTables Editor plugin for Laravel 5.5+.

1186.1M2](/packages/yajra-laravel-datatables-editor)[h5p/h5p-editor

H5P Editor functionality in PHP

761.5M29](/packages/h5p-h5p-editor)

PHPackages © 2026

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