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(); }