I\'m trying to find a way to programmatically set the position of a CKEditor dialog whenever a new one is opened up. The actual setting of the position part seems easy, but wha
After spending several hours today, I was able to figure this out by complete luck. Dialog definitions can be manipulated at load time. Within your config.js
file, add the following:
CKEDITOR.on('dialogDefinition', function(e) {
var dialogName = e.data.name;
var dialogDefinition = e.data.definition;
dialogDefinition.onShow = function() {
// Calculate your newX and newY ...
this.move(newX, newY);
}
}
If you want to adjust the position for a specific dialog you can use dialogName
to test for it.