Skip to content

Commit

Permalink
perfect the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
dwqdaiwenqi committed Mar 13, 2018
1 parent b97a0c4 commit 563d57c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ A rich text editor for mobile web. Mixed editing of photos and Emoji

![pic1](https://github.com/dwqdaiwenqi/readme-img/raw/master/pic1.jpg)



![pic1](https://github.com/dwqdaiwenqi/readme-img/raw/master/pic2.jpg)


Expand All @@ -20,7 +22,7 @@ A rich text editor for mobile web. Mixed editing of photos and Emoji
```js
npm install editor-ovo --save
```
or
## or

```js
cnpm install editor-ovo --save
Expand Down Expand Up @@ -84,7 +86,7 @@ new Reply({
```

# Api
### options
### Options
```js
{
//激活编辑器的元素
Expand Down Expand Up @@ -127,7 +129,7 @@ new Reply({
}

```
### 后台api接口
### Nodejs Api
```js
//nodejs 生成图片url
app.post('/upload', function(req, res){
Expand All @@ -151,7 +153,7 @@ app.post('/upload', function(req, res){
```


## methods
## Methods
| 方法 | 类型 | 描述 | 必需 |
| :------------- | :------------- | :------------- | :------------- |
| clear | function | 清除当前编辑器内容 ||
Expand All @@ -161,7 +163,7 @@ app.post('/upload', function(req, res){
| unbind | function | 解绑它 ||
| generateUrl | function | 对各个base64生成url ||

## mysql存储问题
## Storge in Mysql
如果把用户自己输入的emoji字符也存到mysql数据库中,那么需要对mysql存储方式进行改变。存储单个emoji需要4字节,为了支持4字节的存储,在mysql中需要从'utf8'切换到'utf8mb4'。

如果不方便更改存储编码,也可将options配置中convert_into_entities设置为true,以便存储。
Expand Down

0 comments on commit 563d57c

Please sign in to comment.