欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 织梦教程 > 织梦ckeditor编辑器通过修改js去除img标签内的width和height样式

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:501

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

发布时间:2020-06-17  

1. 找到文件\include\ckeditor\plugins\image\dialogs\image.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');