2017-09-27 36 views
1

是否可以禁用自动检测并在窗口中插入上传/选择图像的高度/重量以将图像插入CKEditor?也许有些触发器?我可以隐藏这些字段(高度和宽度)吗? 但是,如果用户手动设置,然后身高/体重必须适用:( 任何解决方案感谢CKEditor禁用自动检测并插入高度/重量

回答

1

你可以尝试添加到您的CKEditor配置:?!

config.disallowedContent = 'img[height,width]';

UPDATE

config.disallowedContent = 'img[height,width]{width,height}';

它应该禁止属性和样式的高度/宽度

+0

不适合我。因为它规定了选项高度,img标签中的宽度,但CKEditor自动设置为样式。 (style =“width:1350px;”etc) – SMT

+1

请尝试'config.disallowedContent ='img [height,width] {width,height}';' 它应该禁止属性和样式的高度/宽度 – SAZ