Ckeditor 对话框中的嵌套选项卡

Nested Tabs in Ckeditor Dialogbox

Ckeditor 提供了在使用插件创建的对话框中添加标签的功能。它使用 dialog definition 创建 tabs.For 示例:

CKEDITOR.dialog.add( 'testOnly', function( editor ) {
    return {
        title:          'Test Dialog',
        resizable:      CKEDITOR.DIALOG_RESIZE_BOTH,
        minWidth:       500,
        minHeight:      400,
        contents: [
            {
                id:         'tab1',
                label:      'First Tab',
                title:      'First Tab Title',
                accessKey:  'Q',
                elements: [
                    {
                        type:           'text',
                        label:          'Test Text 1',
                        id:             'testText1',
                        'default':      'hello world!'
                    }
                ]
            }
        ]
    };
} );

这会在每个选项卡旁边生成选项卡 ​​other.So 我的问题是:

How can i use this plugin to have Nested Tabs ? so that I could be able to have 2-3 Sub/Nested tabs under the parent one.

你不能。 CKEditor API 从未考虑过这样的用例。

但您可以尝试一些第 3 方解决方案,例如 jQuery UI 或 Bootstrap。例如 Drupal 8 使用带有自定义对话框系统的 CKEditor。