ckeditor编辑器上传图片自动加style尺寸

sloafer 2015-10-31 10:31:29
1:织梦的系统。默认的编辑器 ckeditor
2:文章模型。
3:上传单张图片,总是自动获取尺寸后加入到代码中

转换之后的代码如
<img alt="" src="/uploads/allimg/151031/1-151031223215R4.jpg" style="width: 230px; height: 350px;" />
现在我网站响应式,图片不能定义宽高。
自动加成这样。会拉伸变形。
请大师指点如何解决。
ckeditor目录结构
...全文
2225 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
wb腾格里 2017-10-19
  • 打赏
  • 举报
回复
  • 打赏
  • 举报
回复
引用 5 楼 roby520 的回复:
已解决, 把ckeditor/plugins/image/dialogs/image.js中的 this.imageElement.getAttribute("style") || this.imageElement.removeAttribute("style"); 改为 this.imageElement.setAttribute("style")&&this.imageElement.removeAttribute("style");
这个改完之后得清空一下浏览器缓存
啊啊啊啊嗯嗯 2017-05-25
  • 打赏
  • 举报
回复
楼主找到方法了吗? 今天百度了一天终于找织梦侠找到方法了 http://www.2l3.net/help/modify/488.html 拿走不谢哈!
小麦萌 2016-07-11
  • 打赏
  • 举报
回复
引用 5 楼 roby520 的回复:
已解决, 把ckeditor/plugins/image/dialogs/image.js中的 this.imageElement.getAttribute("style") || this.imageElement.removeAttribute("style"); 改为 this.imageElement.setAttribute("style")&&this.imageElement.removeAttribute("style");
改了没用啊
小区2 2016-04-07
  • 打赏
  • 举报
回复
这篇文章解决方法:http://www.bcty365.com/content-101-3412-1.html 百分百可以解决,亲测
钢子007 2016-03-25
  • 打赏
  • 举报
回复
引用 5 楼 roby520 的回复:
已解决, 把ckeditor/plugins/image/dialogs/image.js中的 this.imageElement.getAttribute("style") || this.imageElement.removeAttribute("style"); 改为 this.imageElement.setAttribute("style")&&this.imageElement.removeAttribute("style");
我怎么没找到这段代码呢,你用的事那个版本的啊?
roby520 2016-03-03
  • 打赏
  • 举报
回复
已解决, 把ckeditor/plugins/image/dialogs/image.js中的 this.imageElement.getAttribute("style") || this.imageElement.removeAttribute("style"); 改为 this.imageElement.setAttribute("style")&&this.imageElement.removeAttribute("style");
roby520 2016-03-03
  • 打赏
  • 举报
回复
同问,我也碰到这个问题,有哪们仁兄解决了没
海盜頭頭 2016-02-20
  • 打赏
  • 举报
回复
同问,我也碰到这个问题 每次上传完图得手动清除下宽度,比较麻烦 宽度还好处理,用样式强制百分比,高度就不好整了
worinima2128 2015-12-09
  • 打赏
  • 举报
回复
楼主解决没有,我也很困扰这个问题·
街头小贩 2015-11-02
  • 打赏
  • 举报
回复
响应的布局图片也有一个原始size呀.你走到牛角尖了

10,606

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧