1

单击工具栏上的newpage按钮后的ckeditor调用函数

4

2 回答 2

2

使用“afterCommandExec”和“beforeCommandExec”:

editor.on('afterCommandExec', handleAfterCommandExec);
function handleAfterCommandExec(event)
{
    var commandName = event.data.name;
    alert(commandName);
}
于 2011-05-06T10:07:47.540 回答
0

我发现了如何捕捉粘贴事件:

editor.on('paste', your_cb_fn);

但是,这似乎不适用于按钮操作:

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

解决方案可能是编辑 _source/plugins 中的插件以创建触发器,但这并不理想。

于 2010-04-26T03:25:28.653 回答