Events CKEditor如何添加selectPage侦听器
我想将selectPage事件的侦听器添加到我的CKEditor插件中,但到目前为止,我无法让它工作。插件工作正常,但我的侦听器不工作。下面的警报永远不会被调用 守则:Events CKEditor如何添加selectPage侦听器,events,plugins,ckeditor,Events,Plugins,Ckeditor,我想将selectPage事件的侦听器添加到我的CKEditor插件中,但到目前为止,我无法让它工作。插件工作正常,但我的侦听器不工作。下面的警报永远不会被调用 守则: var dialog = function(editor) { editor.on('selectPage', function(e) { alert("Page changed"); }); // rest of the plugin cod
var dialog = function(editor) {
editor.on('selectPage', function(e) {
alert("Page changed");
});
// rest of the plugin code
}
有什么地方我做错了吗?结果表明,您必须将其添加到对话框定义中,而不是添加到对话框对象或编辑器对象中
return {
title : editor.lang.googlemaps.title,
minWidth : 500,
minHeight : 460,
onLoad : function()
{
theDialog = this;
// Act on tab switching
theDialog.on('selectPage', function (e)
{
if (CKEDITOR.env.ie7Compat)
fixIE7display();