Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ckeditor dialog positioning

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 possible to configure CKEditor to position the dialogs in a different quadrant of the page? For example top middle?

like image 230
Yehonatan Avatar asked Feb 13 '11 13:02

Yehonatan


1 Answers

Yes, the link MDaubs gives will guide you to do what you want.

I've had to do this in the past and the following snippet will demonstrate a solution for your problem:

CKEDITOR.on('dialogDefinition', function(e) {
    var dialogName = e.data.name;
    var dialogDefinition = e.data.definition;
    dialogDefinition.onShow = function() {
            this.move(this.getPosition().x,0); // Top center
    }
})

You can place this in the config file or the ready function for jQuery.

like image 110
zaf Avatar answered Sep 20 '22 13:09

zaf