From 26a79cddd2b26e77d946a84186320c1b61b6d616 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 17 Oct 2017 09:13:23 +0800 Subject: [PATCH] =?UTF-8?q?ke=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84placehold?= =?UTF-8?q?er=E5=B1=9E=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 264c361df..a52380937 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -5381,7 +5381,11 @@ KEditor.prototype = { return this; }, appendHtml : function(val) { - this.html(this.html() + val); + if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(this.html())){ + this.html(val); + } else{ + this.html(this.html() + val); + } if (this.isCreated) { var cmd = this.cmd; cmd.range.selectNodeContents(cmd.doc.body).collapse(false);