diff --git a/ISSUE.md b/ISSUE.md
index 76b4b1d8e..beddb1f76 100644
--- a/ISSUE.md
+++ b/ISSUE.md
@@ -137,10 +137,26 @@
- [done] 视图增加 “字体” “字号”(字体需要文档说明)
- [done] 支持粘贴内容时忽略图片
+### v3.1.1
+
+- [done] 支持 webp 格式上传
+- [done] 增加粘贴时换行的处理,即`.replace(/(\r\n|\r|\n)/g, '
')`
+- [done] 解决连续粘贴卡顿的问题(将节流间隔由`500ms`改为`100ms`)
+- [done] **上传时配置的自定义参数`uploadImgParams`,去掉自动 encode 的功能,重要!!!**
+- [done] 对于`editor.txt.getJSON()`中的特殊字符进行替换
+
+
### 近期计划解决
-- 外露的修改图片大小的按钮
+- 合并 pr
+- https://github.com/wangfupeng1988/wangEditor/issues/1445
+- https://github.com/wangfupeng1988/wangEditor/issues/1410
+- https://github.com/wangfupeng1988/wangEditor/issues/1396
+- https://github.com/wangfupeng1988/wangEditor/issues/1358
+- https://github.com/wangfupeng1988/wangEditor/issues/1367
+- 销毁的 API ,以及各个生命周期的 hook
- **处理粘贴数据时,要把 pasteHtml 先转换成 vnode 之类的结构化对象,然后再递归处理**
+- 外露的修改图片大小的按钮
- 撤销的兼容性问题(会误伤其他编辑器或者 input textarea 等),考虑用 onchange 记录 undo 和 redo 的内容(但是得考虑直接修改 dom 的情况,如 quote code img list table 菜单)
- 列表撤销会删除一行?https://github.com/wangfupeng1988/wangEditor/issues/1131
- 页面中有 input 等输入标签时,undo redo 会误伤 https://github.com/wangfupeng1988/wangEditor/issues/1024
diff --git a/LICENSE b/LICENSE
index 5239660db..6593f65bd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2017 王福朋
+Copyright (c) 2018 王福朋
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/docs/usage/03-config/01-menu.md b/docs/usage/03-config/01-menu.md
index bce6ba7e4..2730e86ca 100644
--- a/docs/usage/03-config/01-menu.md
+++ b/docs/usage/03-config/01-menu.md
@@ -32,6 +32,8 @@
[
'head', // 标题
'bold', // 粗体
+ 'fontSize', // 字号
+ 'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
diff --git a/docs/usage/04-uploadimg/03-upload-config.md b/docs/usage/04-uploadimg/03-upload-config.md
index 6720ce6da..85cf5d5a1 100644
--- a/docs/usage/04-uploadimg/03-upload-config.md
+++ b/docs/usage/04-uploadimg/03-upload-config.md
@@ -69,7 +69,9 @@ editor.customConfig.uploadImgMaxLength = 5
```javascript
editor.customConfig.uploadImgParams = {
- token: 'abcdef12345' // 属性值会自动进行 encode ,此处无需 encode
+ // 如果版本 <=v3.1.0 ,属性值会自动进行 encode ,此处无需 encode
+ // 如果版本 >=v3.1.1 ,属性值不会自动 encode ,如有需要自己手动 encode
+ token: 'abcdef12345'
}
```
diff --git a/package.json b/package.json
index edf161cf2..3e7ced620 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "wangeditor",
"title": "wangEditor",
- "version": "3.1.0",
+ "version": "3.1.1",
"description": "wangEditor - 基于javascript和css开发的 web 富文本编辑器, 轻量、简洁、易用、开源免费",
"homepage": "http://wangeditor.github.io/",
"author": {
diff --git a/release/wangEditor.js b/release/wangEditor.js
index 0fcb4db3d..36bcf8157 100644
--- a/release/wangEditor.js
+++ b/release/wangEditor.js
@@ -780,7 +780,7 @@ function replaceHtmlSymbol(html) {
if (html == null) {
return '';
}
- return html.replace(//gm, '>').replace(/"/gm, '"');
+ return html.replace(//gm, '>').replace(/"/gm, '"').replace(/(\r\n|\r|\n)/g, '
');
}
// 返回百分比的格式
@@ -797,7 +797,7 @@ function isFunction(fn) {
// 构造函数
function Bold(editor) {
this.editor = editor;
- this.$elem = $('
设置标题
"),type:"list",list:[{$elem:o("正文
"),value:""}],onClick:function(e){t._command(e)}})}function h(e){var t=this;this.editor=e,this.$elem=o('
'),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:160,$title:o("字号
"),type:"list",list:[{$elem:o('x-small'),value:"1"},{$elem:o('small'),value:"2"},{$elem:o("normal"),value:"3"},{$elem:o('large'),value:"4"},{$elem:o('x-large'),value:"5"},{$elem:o('xx-large'),value:"6"}],onClick:function(e){t._command(e)}})}function p(e){var t=this;this.editor=e,this.$elem=o(' '),this.type="droplist",this._active=!1;var n=e.config,i=n.fontNames||[];this.droplist=new d(this,{width:100,$title:o("字体
"),type:"list",list:i.map(function(e){return{$elem:o(''+e+""),value:e}}),onClick:function(e){t._command(e)}})}function f(e,t){this.menu=e,this.opt=t}function m(e){this.editor=e,this.$elem=o(' '),this.type="panel",this._active=!1}function g(e){this.editor=e,this.$elem=o(' '),this.type="click",this._active=!1}function w(e){this.editor=e,this.$elem=o(' '),this.type="click",this._active=!1}function v(e){this.editor=e,this.$elem=o(' '),this.type="click",this._active=!1}function E(e){this.editor=e,this.$elem=o(' '),this.type="click",this._active=!1}function b(e){this.editor=e,this.$elem=o(' '),this.type="click",this._active=!1}function B(e){var t=this;this.editor=e,this.$elem=o(' '),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:120,$title:o("设置列表
"),type:"list",list:[{$elem:o(' 有序列表'),value:"insertOrderedList"},{$elem:o(' 无序列表'),value:"insertUnorderedList"}],onClick:function(e){t._command(e)}})}function y(e){var t=this;this.editor=e,this.$elem=o(' '),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:100,$title:o("对齐方式
"),type:"list",list:[{$elem:o(' 靠左'),value:"justifyLeft"},{$elem:o(' 居中'),value:"justifyCenter"},{$elem:o(' 靠右'),value:"justifyRight"}],onClick:function(e){t._command(e)}})}function C(e){var t=this;this.editor=e,this.$elem=o(' '),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new d(this,{width:120,$title:o("文字颜色
"),type:"inline-block",list:i.map(function(e){return{$elem:o(''),value:e}}),onClick:function(e){t._command(e)}})}function x(e){var t=this;this.editor=e,this.$elem=o(' '),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new d(this,{width:120,$title:o("背景色
"),type:"inline-block",list:i.map(function(e){return{$elem:o(''),value:e}}),onClick:function(e){t._command(e)}})}function I(e){this.editor=e,this.$elem=o(' '),this.type="click",this._active=!1}function Q(e){this.editor=e,this.$elem=o(' '),this.type="panel",this._active=!1}function M(e){this.editor=e,this.$elem=o(' '),this.type="panel",this._active=!1}function S(e){this.editor=e,this.$elem=o(' '),this.type="panel",this._active=!1}function k(e){this.editor=e,this.$elem=o(' '),this.type="panel",this._active=!1}function D(e){this.editor=e;var t=c("w-e-img");this.$elem=o(' '),e.imgMenuId=t,this.type="panel",this._active=!1}function _(e){this.editor=e,this.menus={}}function N(e){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,n=void 0;return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),a(n)}function F(e,t,n){var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,o=void 0,A=void 0;if(null==i?o=window.clipboardData&&window.clipboardData.getData("text"):(o=i.getData("text/plain"),A=i.getData("text/html")),!A&&o&&(A=""+a(o)+"
"),A){var r=A.split("