更换富文本编辑器为【wangEditor3】

This commit is contained in:
2018-03-01 14:03:17 +08:00
parent e2ef8c0162
commit 8d5ad54a20
7 changed files with 82 additions and 20 deletions

View File

@@ -250,6 +250,15 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util', 'face'], f
}
,editer: function(){
var E = window.wangEditor;
var editor = new E('#editor');
editor.customConfig.uploadImgServer = '/upload/img';
editor.create()
return editor;
}
,escape: function(html){
return String(html||'').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')
.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/'/g, '&#39;').replace(/"/g, '&quot;');