From 488e62472d0acda39ed1e6b54785e0f8f74f9b80 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 20:26:50 +0800 Subject: [PATCH] =?UTF-8?q?at=E6=94=B9=E4=B8=BA=E7=82=B9=E5=87=BB=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/at/config.js | 11 ++++++++++- public/assets/kindeditor/kindeditor.js | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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); }