2010-02-09 80 views

回答

0

上NEWPAGE按鈕,我發現瞭如何捕捉到粘貼事件:

editor.on('paste', your_cb_fn); 

然而這並未」不像是會爲按鈕行動工作:

// does nothing 
editor.on('Bold', your_cb_fn); 
editor.on('bold', your_cb_fn); 

的解決方案可能是編輯_source /插件插件創建觸發器,儘管這是不理想的。

2

使用 'afterCommandExec' 和 'beforeCommandExec':

editor.on('afterCommandExec', handleAfterCommandExec); 
function handleAfterCommandExec(event) 
{ 
    var commandName = event.data.name; 
    alert(commandName); 
}