在CKeditor的图像对话框中删除图像的高度和宽度

时间:2015-09-14 08:48:44

标签: ckeditor

由于我的网站使用新的前端框架,所有图像都是默认的最大宽度:100%;这很有效,因为内容容器强制图像的大小正确。 但是,当我插入图像时,背景中的(真棒)Ckeditor设置图像的宽度和高度。所有CMS用户都必须一直手动清除这些字段。这是一件小事,但它开始令人讨厌。

我在使用" setValue"插入值时尝试重置图像的高度和宽度。功能,但高度和宽度仍然自动填充。



element = dialog.getContentElement( 'info', 'txtWidth' ); if(element) element.setValue('');




它有效,但直接覆盖。

我扫描了源代码,但似乎没有选项可以避免填写尺寸。

我是否必须重写源代码(因为更新等而不喜欢这样)或者是否有人知道更好的解决方案?

1 个答案:

答案 0 :(得分:1)

If you adjust the CKEditor settings so it uses attributes instead of inline styles for the images you won't have this problem, the image will show correctly all the time.