From 7e42b42c20874f5c669bd89d6a9ca23c4d3815f4 Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期一, 10 一月 2022 15:46:26 +0800 Subject: [PATCH] 多图上传组件:添加上传超过数量提示 --- src/components/WangEnduit/index.vue | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/components/WangEnduit/index.vue b/src/components/WangEnduit/index.vue index 648b738..3e0d96d 100644 --- a/src/components/WangEnduit/index.vue +++ b/src/components/WangEnduit/index.vue @@ -108,6 +108,20 @@ // info 鏄渶瑕佹彁绀虹殑鍐呭 self.$messagewarn(info) } + // 杩囨护word澶嶅埗 + this.editor.customConfig.pasteTextHandle = function(content) { + var html = content + html = html.replace(/<\/?SPANYES[^>]*>/gi, '')// 绉婚櫎span + html = html.replace(/<\!\-\-(.|[\r\n])*?\-\->/gi, '')// 绉婚櫎娉ㄩ噴 + html = html.replace(/<(\w[^>]*) {2}lang=([^|>]*)([^>]*)/gi, '<$1$3')// 绉婚櫎lang灞炴�� + html = html.replace(/<\\?\?xml[^>]*>/gi, '')// 绉婚櫎xml鍜岀浉鍏虫弿杩� + html = html.replace(/<\/?\w+:[^>]*>/gi, '')// 绉婚櫎xml鍛藉悕绌洪棿鐨勬爣绛� + html = html.replace(/ /gi, '')// 绉婚櫎绌烘牸 + html = html.replace(/^\s+|\s+$/g, '') + html = html.replace(/<o:p> <\/o:p>/g, '')// 绉婚櫎鏍囩 + html = html.replace(/<br\/>/g, '')// 绉婚櫎br鏍囩 + return html + } this.editor.create() // 鍒涘缓瀵屾枃鏈疄渚� // if (!this.content) { // // this.editor.txt.html('璇风紪杈戝唴瀹�1') -- Gitblit v1.8.0