2020-09-11 10:57:20 +08:00
|
|
|
|
# wangEditor
|
2020-05-18 09:29:26 +08:00
|
|
|
|
|
2020-12-14 18:18:31 +08:00
|
|
|
|
<!-- Badge -->
|
|
|
|
|
![Stars badge](https://img.shields.io/badge/stars-11.2-green)
|
2021-03-26 09:42:30 +08:00
|
|
|
|
![Forks badge](https://img.shields.io/badge/forks-2.5k-brightgreen)
|
2020-12-14 18:18:31 +08:00
|
|
|
|
![cypress badge](https://img.shields.io/badge/E2E-Cypress-brightgreen)
|
|
|
|
|
![jest badge](https://img.shields.io/badge/unit%20test-jest-yellowgreen)
|
2020-10-07 14:08:16 +08:00
|
|
|
|
![build badge](https://github.com/wangeditor-team/wangEditor/workflows/build/badge.svg)
|
2021-04-22 17:40:04 +08:00
|
|
|
|
![MIT License](https://img.shields.io/badge/License-MIT-blue)
|
2021-03-26 09:42:30 +08:00
|
|
|
|
[![](https://data.jsdelivr.com/v1/package/npm/wangeditor/badge)](https://www.jsdelivr.com/package/npm/wangeditor)
|
2021-02-24 09:44:27 +08:00
|
|
|
|
|
2020-12-14 18:18:31 +08:00
|
|
|
|
<!-- PROJECT LOGO -->
|
|
|
|
|
<br />
|
|
|
|
|
<p align="center">
|
|
|
|
|
<a href="http://www.wangeditor.com/">
|
|
|
|
|
<img src="./docs/imgs/logo.png" alt="Logo" width="80" height="80">
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<h3 align="center">wangEditor</h3>
|
|
|
|
|
|
|
|
|
|
<p align="center">
|
2021-02-24 09:44:27 +08:00
|
|
|
|
轻量级 web 富文本编辑器,配置方便,使用简单!
|
2020-12-14 18:18:31 +08:00
|
|
|
|
<br />
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<a href="http://www.wangeditor.com"><strong>官网</strong></a>
|
2020-12-14 18:18:31 +08:00
|
|
|
|
·
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<a href="http://www.wangeditor.com/doc/"><strong>文档</strong></a>
|
2020-12-14 18:18:31 +08:00
|
|
|
|
<br />
|
|
|
|
|
<br />
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<a href="./README-en.md">English</a>
|
2020-12-14 18:18:31 +08:00
|
|
|
|
·
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<a href="http://www.wangeditor.com/doc/#demo">在线示例</a>
|
2020-12-14 18:18:31 +08:00
|
|
|
|
·
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<a href="https://github.com/wangeditor-team/wangEditor/issues/new?template=bug.md">提交 bug</a>
|
2020-12-14 18:18:31 +08:00
|
|
|
|
·
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<a href="https://github.com/wangeditor-team/wangEditor/issues/new?template=feature.md">建议增加新功能</a>
|
2020-12-14 18:18:31 +08:00
|
|
|
|
</p>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<!-- ABOUT THE PROJECT -->
|
2021-02-24 09:44:27 +08:00
|
|
|
|
## 项目介绍
|
|
|
|
|
|
|
|
|
|
wangEditor 是一款使用 Typescript 开发的 Web 富文本编辑器, 轻量、简洁、易用、开源免费。
|
2020-12-14 18:18:31 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
兼容常见的 PC 浏览器:Chrome,Firefox,Safar,Edge,QQ 浏览器,IE11。
|
2020-12-14 18:18:31 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
不支持移动端。
|
2020-12-14 18:18:31 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
当前是 `v4` 版本。想继续使用 `v3` 版本看[这里](http://www.wangeditor.com/doc/pages/01-%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8/08-%E4%BD%BF%E7%94%A8V3%E7%89%88%E6%9C%AC.html)。
|
2020-12-14 18:18:31 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
![Product Screen Shot](./docs/imgs/demo.png)
|
2020-12-14 18:18:31 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
## 安装和使用
|
2020-12-14 18:18:31 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
### NPM
|
|
|
|
|
```bash
|
|
|
|
|
npm i wangeditor --save
|
|
|
|
|
```
|
|
|
|
|
安装后几行代码即可创建一个编辑器:
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
import E from "wangeditor";
|
|
|
|
|
const editor = new E("#div1");
|
|
|
|
|
editor.create();
|
|
|
|
|
```
|
2021-02-24 09:44:27 +08:00
|
|
|
|
### CDN
|
2020-12-09 17:10:14 +08:00
|
|
|
|
```html
|
|
|
|
|
<script type="text/javascript" src="https://unpkg.com/wangeditor/dist/wangEditor.min.js"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
const E = window.wangEditor
|
|
|
|
|
const editor = new E('#div1')
|
2021-02-24 09:44:27 +08:00
|
|
|
|
// 或者 const editor = new E(document.getElementById('div1'))
|
2020-12-09 17:10:14 +08:00
|
|
|
|
editor.create()
|
|
|
|
|
</script>
|
|
|
|
|
```
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
2020-12-14 18:18:31 +08:00
|
|
|
|
<!-- CONTRIBUTING -->
|
2021-02-24 09:44:27 +08:00
|
|
|
|
## 贡献
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
贡献使得开源社区成为一个学习、激励和创造的好地方,非常感谢你所做的任何贡献。在贡献 `wangEditor` 之前,你需要阅读文档 [contribution](./docs/contribution.md)。
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
2020-12-14 18:18:31 +08:00
|
|
|
|
<!-- LICENSE -->
|
2021-02-24 09:44:27 +08:00
|
|
|
|
## 许可证
|
|
|
|
|
|
|
|
|
|
项目在 MIT 的许可证下发布, 查看更多 [MIT](https://en.wikipedia.org/wiki/MIT_license) 许可证信息。
|
2020-06-10 16:04:14 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
<!-- CONTACT -->
|
|
|
|
|
## 交流
|
2020-06-10 16:04:14 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
加入 QQ 群
|
2021-03-10 11:29:37 +08:00
|
|
|
|
- 164999061(人已满)
|
2021-06-30 08:47:29 +08:00
|
|
|
|
- 710646022
|
|
|
|
|
- 901247714(人已满)
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
|
|
|
|
提交 bug 或建议
|
|
|
|
|
- [github issues](https://github.com/wangeditor-team/wangeditor/issues) 提交问题
|
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
## 开发团队
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
有专业[开发团队](http://www.wangeditor.com/doc/#%E5%BC%80%E5%8F%91%E4%BA%BA%E5%91%98)维护,非个人单兵作战。
|
2020-09-11 10:57:20 +08:00
|
|
|
|
|
2021-02-24 09:44:27 +08:00
|
|
|
|
想加入 wangEditor 研发团队,可申请加入 QQ 群,然后私聊群主。
|
|
|
|
|
|
|
|
|
|
## 为我们加油
|
|
|
|
|
|
|
|
|
|
你的支持,将激励我们输出更多优质内容!
|
2020-06-10 16:04:14 +08:00
|
|
|
|
|
2020-09-11 10:57:20 +08:00
|
|
|
|
![](./docs/imgs/wechat-pay.jpeg)
|
2020-09-14 11:15:50 +08:00
|
|
|
|
![](./docs/imgs/ali-pay.jpeg)
|
2021-02-24 09:44:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|