0 Comments

织梦编辑器里的ckeditor上传图片去除宽高

发布于:2018-05-03  |   作者:织梦二次开发网  |   已聚集:人围观
织梦里面的编辑器ckeditor在上传图片的时候自动会带上图片的宽高,这样会导致手机站上图片出现变成,这里织梦二次开发网给出去除style的方案


找到\include\ckeditor\plugins\image\dialogs\image.js

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');
}

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');
}

找到如上代码注释即可
标签:
专业承接织梦仿站,织梦模块开发,织梦插件开发,织梦模板定制,网站优化,可联系QQ:
点击这里给我发消息
 报上名号来:     神兽验证马:
点击我更换验证码
飞机