PHPackages                             jianqingwang/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. jianqingwang/ueditor

ActiveLibrary

jianqingwang/ueditor
====================

UEditor富文本web编辑器

00JavaScript

Since Oct 18Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Get Started
===========

[](#get-started)

> 鉴于目前 ISSUE 较多而维护时间较少，且在进行后续的版本更新，目前暂时关闭 ISSUE，若社区有人跟进，欢迎和我们联系。重复的问题，请参阅常见问题的 [FAQ Wiki](https://github.com/fex-team/ueditor/wiki/FAQ)。

重要安全通告：
-------

[](#重要安全通告)

UEditor 所提供的所有后端代码都仅为 DEMO 作用，切不可直接使用到生产环境中，目前已知 php 的代码会存在 ssrf 的安全漏洞。修复方式：使用最新的 Uploader.class [code](https://github.com/fex-team/ueditor/blob/dev-1.5.0/php/Uploader.class.php) .

ueditor富文本编辑器介绍
---------------

[](#ueditor富文本编辑器介绍)

UEditor是由百度web前端研发部开发所见即所得富文本web编辑器，具有轻量，可定制，注重用户体验等特点，开源基于MIT协议，允许自由使用和修改代码。

1 入门部署和体验
---------

[](#1-入门部署和体验)

### 1.1 下载编辑器

[](#11-下载编辑器)

1. `git clone ` 仓库
2. `npm install` 安装依赖（如果没有安装 grunt , 请先在全局安装 grunt）
3. 在终端执行 `grunt default`

### 1.2 创建demo文件

[](#12-创建demo文件)

解压下载的包，在解压后的目录创建demo.html文件，填入下面的html代码

```
>

	ueditor demo

	这里写你的初始化内容

	    var ue = UE.getEditor('container');

```

### 1.3 在浏览器打开demo.html

[](#13-在浏览器打开demohtml)

如果看到了下面这样的编辑器，恭喜你，初次部署成功！

[![部署成功](https://camo.githubusercontent.com/a51f0525475d02a43104269f238fc6352525bfc499550b19544405c9881e96d8/687474703a2f2f6665782e62616964752e636f6d2f75656469746f722f646f632f696d616765732f64656d6f2e706e67)](https://camo.githubusercontent.com/a51f0525475d02a43104269f238fc6352525bfc499550b19544405c9881e96d8/687474703a2f2f6665782e62616964752e636f6d2f75656469746f722f646f632f696d616765732f64656d6f2e706e67)

### 1.4 传入自定义的参数

[](#14-传入自定义的参数)

编辑器有很多可自定义的参数项，在实例化的时候可以传入给编辑器：

```
var ue = UE.getEditor('container', {
    autoHeight: false
});
```

配置项也可以通过ueditor.config.js文件修改，具体的配置方法请看\[前端配置项说明\]( 前端配置项说明.md)

### 1.5 设置和读取编辑器的内容

[](#15-设置和读取编辑器的内容)

通getContent和setContent方法可以设置和读取编辑器的内容

```
var ue = UE.getEditor();
//对编辑器的操作最好在编辑器ready之后再做
ue.ready(function(){
    //设置编辑器的内容
    ue.setContent('hello');
    //获取html内容，返回: hello
    var html = ue.getContent();
    //获取纯文本内容，返回: hello
    var txt = ue.getContentTxt();
});
```

ueditor的更多API请看[API 文档](http://ueditor.baidu.com/doc "ueditor API 文档")

2 详细文档
------

[](#2-详细文档)

ueditor 官网：[http://ueditor.baidu.com](http://ueditor.baidu.com "ueditor 官网")

ueditor API 文档：[http://ueditor.baidu.com/doc](http://ueditor.baidu.com/doc "ueditor API 文档")

ueditor github 地址：[http://github.com/fex-team/ueditor](http://github.com/fex-team/ueditor "ueditor github 地址")

ueditor 第三方插件贡献 wiki : [第三方插件贡献规范](http://ueditor.baidu.com/website/thirdproject.html)

ueditor 贡献代码规范（javascript）： [javascript规范](https://github.com/fex-team/styleguide/blob/master/javascript.md)

3 第三方贡献
-------

[](#3-第三方贡献)

ueditor for nodejs 参考

4 联系我们
------

[](#4-联系我们)

email：[ueditor@baidu.com](mailto://email:ueditor@baidu.com "发邮件给ueditor开发组")

issue：[github issue](http://github.com/fex-team/ueditor/issues "ueditor 论坛")

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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/990ef43d92b4ac635dadfca3cb19ddedd89589439fbdf36099ecc4ee18bc6a89?d=identicon)[jianqingwang](/maintainers/jianqingwang)

---

Top Contributors

[![campaign](https://avatars.githubusercontent.com/u/540058?v=4)](https://github.com/campaign "campaign (1175 commits)")[![carsonxu](https://avatars.githubusercontent.com/u/24862812?v=4)](https://github.com/carsonxu "carsonxu (542 commits)")[![yancend](https://avatars.githubusercontent.com/u/3114622?v=4)](https://github.com/yancend "yancend (173 commits)")[![worry127722](https://avatars.githubusercontent.com/u/6937117?v=4)](https://github.com/worry127722 "worry127722 (141 commits)")[![taoqili](https://avatars.githubusercontent.com/u/687574?v=4)](https://github.com/taoqili "taoqili (138 commits)")[![HanCong03](https://avatars.githubusercontent.com/u/1978648?v=4)](https://github.com/HanCong03 "HanCong03 (134 commits)")[![zhuwenxuan](https://avatars.githubusercontent.com/u/538779?v=4)](https://github.com/zhuwenxuan "zhuwenxuan (65 commits)")[![techird](https://avatars.githubusercontent.com/u/1901286?v=4)](https://github.com/techird "techird (42 commits)")[![Phinome](https://avatars.githubusercontent.com/u/1940194?v=4)](https://github.com/Phinome "Phinome (40 commits)")[![kaisy00](https://avatars.githubusercontent.com/u/1744696?v=4)](https://github.com/kaisy00 "kaisy00 (15 commits)")[![csbde](https://avatars.githubusercontent.com/u/478239?v=4)](https://github.com/csbde "csbde (12 commits)")[![Akikonata](https://avatars.githubusercontent.com/u/1574763?v=4)](https://github.com/Akikonata "Akikonata (10 commits)")[![StruggleBird](https://avatars.githubusercontent.com/u/2705002?v=4)](https://github.com/StruggleBird "StruggleBird (6 commits)")[![jianqingwang](https://avatars.githubusercontent.com/u/6880695?v=4)](https://github.com/jianqingwang "jianqingwang (4 commits)")[![Dafrok](https://avatars.githubusercontent.com/u/6159588?v=4)](https://github.com/Dafrok "Dafrok (3 commits)")[![risent](https://avatars.githubusercontent.com/u/81473?v=4)](https://github.com/risent "risent (3 commits)")[![zxeoc](https://avatars.githubusercontent.com/u/4046320?v=4)](https://github.com/zxeoc "zxeoc (2 commits)")[![minikey](https://avatars.githubusercontent.com/u/8241628?v=4)](https://github.com/minikey "minikey (2 commits)")[![regrexd](https://avatars.githubusercontent.com/u/259598216?v=4)](https://github.com/regrexd "regrexd (2 commits)")[![sjshare](https://avatars.githubusercontent.com/u/19381444?v=4)](https://github.com/sjshare "sjshare (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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