From 26624c8009f8b72b8416821670538334ceab4c3f Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Sep 2015 16:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=9B=9E=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=A1=86=E7=9A=84=E2=80=9C=E6=88=91=E8=A6=81=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E2=80=9D=E7=9A=84=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/plugins/emoticons/emoticons.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/assets/kindeditor/plugins/emoticons/emoticons.js b/public/assets/kindeditor/plugins/emoticons/emoticons.js index c89e0c6ee..b9dfec431 100644 --- a/public/assets/kindeditor/plugins/emoticons/emoticons.js +++ b/public/assets/kindeditor/plugins/emoticons/emoticons.js @@ -13,7 +13,7 @@ KindEditor.plugin('emoticons', function(K) { allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons, currentPageNum = 1; self.clickToolbar(name, function() { - this.edit.focus();//Èç¹ûûÓÐÕâ¾ä »ðºüÏÂÈ¡²»µ½½¹µã µ¼ÖÂ_getSel()Ϊ¿Õ ±¨´í + this.edit.focus();//���û����� �����ȡ�������� ����_getSel()�� ���� var rows = 5, cols = 9, total = 135, startNum = 0, cells = rows * cols, pages = Math.ceil(total / cells), colsHalf = Math.floor(cols / 2), @@ -55,6 +55,9 @@ KindEditor.plugin('emoticons', function(K) { K(this).removeClass('ke-on'); }); cell.click(function(e) { + if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){ + self.edit.html(''); + } self.insertHtml('').hideMenu().focus(); e.stop(); });