Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
单击工具栏上的“新建页面”按钮后的Ckeditor调用函数_Ckeditor - Fatal编程技术网

单击工具栏上的“新建页面”按钮后的Ckeditor调用函数

单击工具栏上的“新建页面”按钮后的Ckeditor调用函数,ckeditor,Ckeditor,单击工具栏上的newpage按钮后的Ckeditor调用函数我发现了如何捕获粘贴事件: editor.on('paste', your_cb_fn); 但是,这似乎不适用于按钮操作: // does nothing editor.on('Bold', your_cb_fn); editor.on('bold', your_cb_fn); 解决方案可能是编辑源/插件中的插件以创建触发器,但这并不理想。使用“afterCommandExec”和“BeforeComandExec”: editor

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

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

editor.on('paste', your_cb_fn);
但是,这似乎不适用于按钮操作:

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

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

使用“afterCommandExec”和“BeforeComandExec”:

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

有进展吗?-我还想知道如何做到这一点。这种问题在CKEditor论坛上已经被问了很多次,但没有得到解决。。。