CKEDITOR.on('dialogDefinition', function( ev ) {
// Take the dialog window name and its definition from the event data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if ( dialogName == 'image' ) {
dialogDefinition.onShow = function() {
// This code will open the Advanced tab.
this.selectPage( 'advanced' );
};
}
});
The above example located in the howtos prevents the call to the image onshow event and then i'm getting an error a.preview undefined.
Found this workaround http://stackoverflow.com/a/17988403
Is that the way to go? Or am i doing something wrong?
Thanks.

dialogDefinition.dialog.on('show', function(event) {
}
);
Viewing the source found that this is the correct way.