I am using the enhanced image plugin on ckeditor 4.4.4 and cannot seem to set default values for align, caption, and/or width. I have successfully set defaults on the table dialog but the same syntax doesn't seem to work for image2. What am I doing wrong?
CKEDITOR.on('dialogDefinition', function (e) { var dialogName = e.data.name; var dialog = e.data.definition.dialog; var dialogDefinition = e.data.definition; //mod image2 dialog, hide URL source, set default align and width if (dialogName == "image2") { dialog.on('show', function() { this.getContentElement('info', 'src').disable(); //<-- works }); var infoTab = dialogDefinition.getContents('info'); var imageAlign = infoTab.get('align'); imageAlign['default'] = 'center'; var imageWidth = infoTab.get('width'); imageWidth['default'] = '300'; var imageCaption = infoTab.get('hasCaption'); imageCaption['default'] = 'checked'; }
Figured it out. I needed to
Figured it out. I needed to set the values in the upload response, like how it's done in the File Browser API documentation.