ckeditor dialog positioning

前端 未结 5 1527
臣服心动
臣服心动 2021-01-17 16:40

Dialog windows for CKEditor by default appear in the middle of the page but if the page is an iframe with a big height the dialogs appear way down the page.

Is it po

5条回答
  •  耶瑟儿~
    2021-01-17 16:58

    Correct syntax is:

    CKEDITOR.on('dialogDefinition', function(ev) {
        var dialogName = ev.data.name;
        var dialogDefinition = ev.data.definition;
        var dialog = dialogDefinition.dialog;
        if (dialogName == 'image2') {
            dialogDefinition.onShow = CKEDITOR.tools.override(dialogDefinition.onShow, function(original) { 
                return function() {
                    original.call(this);
                    CKEDITOR.tools.setTimeout( function() {
    
                        /*do anything: this.move(this.getPosition().x, $(e.editor.container.$).position().top);*/
    
                    }, 0);
                }
            });
        }
    });
    

提交回复
热议问题