2
votes

I am using captioned image plugin in ckeditor. Where i can see caption with image. This figcaption(caption of image) have by default attribute contenteditable="true". Can i remove this attribute from image2 configuration or can i make this contenteditable to false. Because on my creator i am showing by default caption of image so i am not allowing user to change default caption.

config.extraPlugins = 'image2';

I tried to found its configuration but dint get any config for that.

1

1 Answers

1
votes

The editable areas inside widgets (the Image2 plugin uses widgets to insert images) are defined by editables property in widget definition. Image2 plugin has this property fixed so it cannot be changed by config options.

However, it can be replaced using widgetDefiniton event like this:

editor.on( 'widgetDefinition', function( evt ) {
    var widget = evt.data;

    if ( widget.name == 'image' ) {
        widget.editables = null;
    }
} );