gpt4 book ai didi

events - CKEditor 如何添加 selectPage 监听器

转载 作者:行者123 更新时间:2023-12-04 06:14:50 24 4
gpt4 key购买 nike

我想将 selectPage 事件的监听器添加到我的 CKEditor 插件中,但到目前为止我无法让它工作。该插件工作正常,但我的听众无法正常工作。下面的警报永远不会被调用。

编码:

    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();

关于events - CKEditor 如何添加 selectPage 监听器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7387794/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com