From 5748078e3efba12f707d4cb674a9de097cb77961 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 20:40:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E8=B0=83=E7=94=A8=E4=B8=80=E6=AC=A1at?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/at/config.js | 13 ++++++++++--- public/assets/kindeditor/kindeditor.js | 1 - 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/public/assets/kindeditor/at/config.js b/public/assets/kindeditor/at/config.js index 71b0d8dc2..2bab7eb67 100644 --- a/public/assets/kindeditor/at/config.js +++ b/public/assets/kindeditor/at/config.js @@ -44,9 +44,16 @@ var enableAt = function(_editor) { console.log(_editor.options); var input = $(ifrBody); - _editor.options.enable_at = function(){ - input.atwho(at_config); - } + + _editor.options.enable_at = (function(){ + var first = true; + return function(){ + if(first){ + input.atwho(at_config); + first = false; + } + } + })(); //$(ifrBody).atwho(at_config); diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 5841a2339..6065a563f 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -4730,7 +4730,6 @@ function _bindTabEvent() { function _bindFocusEvent() { var self = this; K(self.edit.textarea[0], self.edit.win).focus(function(e) { - if(typeof self.options.enable_at === 'function'){ self.options.enable_at(); }