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');
}
這樣即可去除織夢自帶編輯器ckeditor上傳圖片自動生成的style樣式



















