diff --git a/public/assets/kindeditor/at/config.js b/public/assets/kindeditor/at/config.js index 45e7c3195..71b0d8dc2 100644 --- a/public/assets/kindeditor/at/config.js +++ b/public/assets/kindeditor/at/config.js @@ -41,7 +41,16 @@ var enableAt = function(_editor) { limit: 200 }; - $inputor = $(ifrBody).atwho(at_config); + console.log(_editor.options); + + var input = $(ifrBody); + _editor.options.enable_at = function(){ + input.atwho(at_config); + } + + //$(ifrBody).atwho(at_config); + + //$inputor.caret('pos', 47); //$inputor.focus().atwho('run'); }; diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 930911e76..5841a2339 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -4730,6 +4730,10 @@ 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(); + } if (self.afterFocus) { self.afterFocus.call(self, e); }