at改为点击时加载.

This commit is contained in:
guange 2015-12-18 20:26:50 +08:00
parent e9a45012f8
commit 488e62472d
2 changed files with 14 additions and 1 deletions

View File

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

View File

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