ckeditor编辑器上传图片自动去除style宽度与高度尺寸

Write by webmaster in at 2018-06-16 10:41:41

打开ckeditor/plugins/image/dialogs目录中的image.js
查找:this.imageElement.getAttribute(“style”)
把this.imageElement.getAttribute(“style”) || this.imageElement.removeAttribute(“style”);
修改为:this.imageElement.setAttribute(“style”)&&this.imageElement.removeAttribute(“style”)