加入收藏 | 设为首页 | 会员中心 | 我要投稿 鄂州站长网 (https://www.0711zz.com/)- 数据分析、网络、云渲染、应用安全、大数据!
当前位置: 首页 > 综合聚焦 > CMS系统 > 正文

织梦ckeditor编辑器通过修改js去除img标签内的width和height样式

发布时间:2021-03-31 04:24:38 所属栏目:CMS系统 来源:互联网
导读:1. 找到文件includeckeditorpluginsimagedialogsimage.js 2. 使用工具美化js代码 3. 搜索 setStyle(width, CKEDITOR.tools.cssLength 找到下面设置width的代码并注释掉 if (C == d) { if (F) D.setStyle(width, CKEDITOR.tools.cssLength(F)); else D.

1. 找到文件includeckeditorpluginsimagedialogsimage.js

2. 使用工具美化js代码

3. 搜索 setStyle('width',CKEDITOR.tools.cssLength

找到下面设置width的代码并注释掉

if (C == d) {

if (F) D.setStyle('width',CKEDITOR.tools.cssLength(F));

else D.removeStyle('width');

!E && D.removeAttribute('width');

} else if (C == f) {

var G = F.match(h);

if (!G) {

var H = this.getDialog().originalElement;

if (H.getCustomData('isReady') == 'true') D.setStyle('width',H.$.width + 'px');

} else D.setStyle('width',CKEDITOR.tools.cssLength(F));

} else if (C == g) {

D.removeAttribute('width');

D.removeStyle('width');

}

4. 搜索 setStyle('height',CKEDITOR.tools.cssLength

找到下面设置height的代码并注释掉

if (C == d) {

if (F) D.setStyle('height',CKEDITOR.tools.cssLength(F));

else D.removeStyle('height');

!E && D.removeAttribute('height');

} else if (C == f) {

var G = F.match(h);

if (!G) {

var H = this.getDialog().originalElement;

if (H.getCustomData('isReady') == 'true') D.setStyle('height',H.$.height + 'px');

} else D.setStyle('height',CKEDITOR.tools.cssLength(F));

} else if (C == g) {

D.removeAttribute('height');

D.removeStyle('height');

}

这样即可去除织梦自带编辑器ckeditor上传图片自动生成的style样式


(编辑:鄂州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读