只调用一次at列表

This commit is contained in:
guange 2015-12-18 20:40:52 +08:00
parent 1aeef0d49c
commit 5748078e3e
2 changed files with 10 additions and 4 deletions

View File

@ -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);

View File

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