Ckeditor 如果同一对话框注册两次,则Contextmenu不正确
我们得到了一个配置文件,稍后将循环该文件,并在其中注册每个对话框:Ckeditor 如果同一对话框注册两次,则Contextmenu不正确,ckeditor,Ckeditor,我们得到了一个配置文件,稍后将循环该文件,并在其中注册每个对话框: let $dialogs = [{ id: 'hyphenationDialog', label: 'doesnt_matter', icon: 'btnHyphenation', toggle: true, ctx: true, isDialog: true }, { id: 'tdDialog', label: 'Column-Width TD', to
let $dialogs = [{
id: 'hyphenationDialog',
label: 'doesnt_matter',
icon: 'btnHyphenation',
toggle: true,
ctx: true,
isDialog: true
}, {
id: 'tdDialog',
label: 'Column-Width TD',
toggle: false,
ctx: true,
isDialog: true,
toggleRule: 'TD',
ctxGroup: 'table'
}, {
id: 'tdDialog',
label: 'Column-Width TH',
toggle: false,
ctx: true,
isDialog: true,
toggleRule: 'TH',
ctxGroup: 'table'
}
当我启动CKEditor时,一切都启动了,然后当我打开Contextmenu时,我得到了3个条目:
- 没关系
- 列宽
- 列宽
tdDialog
有关。当我注册两个具有相同id的contextMenuItems时,最后添加的标签将用于两个contextMenuItems。
当我复制并重命名对话框,如tdDialogTh
和tdDialogTd
编辑上面的配置文件时,结果与预期一致:
- 没关系
- 列宽
- 列宽