1:粘贴内容图片重载问题
修改 ueditor.config.js 在 window.UEDITOR_CONFIG 中 catchRemoteImageEnable:false 配置项
2:去掉编辑器图片中间的空白分割块,以及图片显示宽度
修改ueditor.all.js
render: function (container){
//设置图片最大宽度,以免撑出滚动条
'img{max-width:100%;vertical-align:top;outline-width:0px;}'+
//设置段落间距
"p{margin:0;}" +
"p:last-child{margin-bottom:9px;}</style>" +
}
3:关闭本地保存
修改 ueditor.all.js
'contentchange': function () {
if (!me.getOpt('enableAutoSave')) {
return;
}
...
4:大文件上传超时
修改 webuploader.js
Transport.options = {
server: '',
method: 'POST',
// 跨域时,是否允许携带cookie, 只有html5 runtime才有效
withCredentials: false,
fileVal: 'file',
timeout: 30 * 60 * 1000, // luoyi 修改为30分钟
formData: {},
headers: {},
sendAsBinary: false
};
5:多图片上传图片顺序
修改 ueditor/dialogs/image/image.js
uploader.on('uploadSuccess', function (file, ret) {
...
if (json.state == 'SUCCESS') {
// _this.imageList.push(json);
_this.imageList[$file.index()] = json;
$file.append('<span class="success"></span>');
}
...
6:多图上传时,修改图片的尺寸
修改 ueditor/jsp/config.json
"imageCompressEnable": true, /* 是否压缩图片,默认是true */
"imageCompressBorder": 8800, /* 图片压缩最长边限制 */
7:单图上传
修改 ueditor.all.js
if(json.state == 'SUCCESS' && json.url) {
loader = me.document.getElementById(loadingId);
loader.setAttribute('src', link);
loader.setAttribute('_src', link);
loader.setAttribute('title', json.title || '');
loader.setAttribute('alt', json.original || '');
loader.setAttribute('width', 800); 修改
loader.setAttribute('height', 600); 修改
loader.removeAttribute('id');
domUtils.removeClasses(loader, 'loadingclass');
}
8:去掉图片上传后的title以及alt
修改 ueditor.all.js
if(json.state == 'SUCCESS' && json.url) {
loader = me.document.getElementById(loadingId);
loader.setAttribute('src', link);
loader.setAttribute('_src', link);
loader.removeAttribute('title', json.title || ''); //去除title
loader.removeAttribute('alt', json.original || ''); //去除alt
loader.removeAttribute('id');
domUtils.removeClasses(loader, 'loadingclass');
}