CKEditor Captioned Image(Image 2 插件)
CKEditor Captioned Image(Image 2 Plugin)
我在 ckeditor 中使用带字幕的图像插件。我在哪里可以看到带图片的标题。这个 figcaption(图像的标题)默认属性为 contenteditable="true"
。我可以从 image2 配置中删除此属性,还是可以将此 contenteditable 设置为 false。因为在我的创作者身上,我默认显示图像标题,所以我不允许用户更改默认标题。
config.extraPlugins = 'image2';
我试图找到它的配置,但没有得到任何配置。
小部件内的可编辑区域(Image2插件使用小部件插入图像)由editables property in widget definition. Image2 plugin has this property fixed定义,因此无法通过配置选项更改。
但是,它可以用 widgetDefiniton event 替换,如下所示:
editor.on( 'widgetDefinition', function( evt ) {
var widget = evt.data;
if ( widget.name == 'image' ) {
widget.editables = null;
}
} );
我在 ckeditor 中使用带字幕的图像插件。我在哪里可以看到带图片的标题。这个 figcaption(图像的标题)默认属性为 contenteditable="true"
。我可以从 image2 配置中删除此属性,还是可以将此 contenteditable 设置为 false。因为在我的创作者身上,我默认显示图像标题,所以我不允许用户更改默认标题。
config.extraPlugins = 'image2';
我试图找到它的配置,但没有得到任何配置。
小部件内的可编辑区域(Image2插件使用小部件插入图像)由editables property in widget definition. Image2 plugin has this property fixed定义,因此无法通过配置选项更改。
但是,它可以用 widgetDefiniton event 替换,如下所示:
editor.on( 'widgetDefinition', function( evt ) {
var widget = evt.data;
if ( widget.name == 'image' ) {
widget.editables = null;
}
} );