Reputation: 7543
My current Image Properties dialog box only has the Image Info
and Link
tabs available. I want to change this dialog box so that:
Image Info
screenLink
tabUpload
tab so that users can choose an image file that resides on their local computerI've been doing lots of searches but can't understand how to do the above at all. Any pointers please? I am using CKEditor 4.4.6 Standard.
Upvotes: 7
Views: 7598
Reputation: 501
Okay, here's the code on how handle the Image dialog:
CKEDITOR.on('dialogDefinition', function(ev) {
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if (dialogName == 'image') {
var infoTab = dialogDefinition.getContents( 'info' );
infoTab.remove( 'txtBorder' ); //Remove Element Border From Tab Info
infoTab.remove( 'txtHSpace' ); //Remove Element Horizontal Space From Tab Info
infoTab.remove( 'txtVSpace' ); //Remove Element Vertical Space From Tab Info
infoTab.remove( 'txtWidth' ); //Remove Element Width From Tab Info
infoTab.remove( 'txtHeight' ); //Remove Element Height From Tab Info
//Remove tab Link
dialogDefinition.removeContents( 'Link' );
}
});
For point 3, the default CKEditor doesn't contain Image Browsing Facility... And this mean that the upload and browse button will not appear...
There is 3 options here, and you can see my comment on this page: link on how you can do this.
Upvotes: 9
Reputation: 2239
The following resources might be helpful:
Upvotes: 2