# ushare-editor
## 介紹
**ushareEditor** —— 基于wangEditor@3.1.1開發的富文本編輯器,輕量級,配置方便,使用簡單。支持 IE10+ 瀏覽器。
- 源碼:[https://github.com/HEJIN2016/ushare-editor](https://github.com/HEJIN2016/ushare-editor) (歡迎 star)

## 下載
- 直接下載:[https://github.com/HEJIN2016/ushare-editor](https://github.com/HEJIN2016/ushare-editor)
- 使用`npm`下載:`npm install ushare-editor`
## 優化
針對wangeditor
1. 部分UI重新設計;
2. 增加分割線功能;
3. 支持生成圖片介紹文字功能,開啟該功能時圖片將居中顯示;
4. 支持第三方平臺拷貝文字時去除字體、去除字體大小等過濾;
5. 增加代碼鏈接判空校驗、鏈接自動插入http協議頭;
6. 支持qq、微信等截圖然后直接拷貝圖片功能(該功能需后臺支持圖片上傳功能或者配置七牛等第三方存儲);
7. 抽離css樣式,用戶可自行替換樣式;
8. 修復了部分bug
## 使用
ushare-editor使用方式與[wangeditor](http://wangeditor.com)基本一致,只在部分地方做出補充
```javascript
<link rel='stylesheet' href='usharerEditor.css'>
<script src='ushareEditor.js'></script>
const E = window.ushareEditor
const editor = new E('#div')
editor.create()
```
webpack
```javascript
const ushareEditor = require('ushare-editor');
require('ushare-editor/ushareEditor.css');
const editor = new ushareEditor('#div');
editor.create();
```
## 運行 demo
- 可下載查看[ushare-editor](https://github.com/HEJIN2016/ushare-editor)中的demo
- 可查看[wangeditor](http://www.wangeditor.com)相關demo,使用方式基本一致