ueditor.all.js中查找关键字
domUtils.on(iframe, 'load', callback);
然后替换
//domUtils.on(iframe, 'load', callback);
//form.action = utils.formatUrl(imageActionUrl + (imageActionUrl.indexOf('?') == -1 ? '?':'&') + params);
//form.submit();
var formdata = new FormData(form);
var arr,reg=new RegExp("(^| )_token=([^;]*)(;|$)");
var myForm = document.getElementById("myForm");
var xhr= new XMLHttpRequest();
xhr.open("POST", me.getOpt('serverUrl')+'?action=uploadimage', true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4)
if ((xhr.status >=200 && xhr.status < 300) || xhr.status == 304)
alert(xhr.responseText);
}
xhr.send(formdata);
xhr.onreadystatechange = function () {
if(xhr.readyState == 4) {
console.log(xhr.responseText);
var response = JSON.parse(xhr.responseText);
if(response.success ){
loader = me.document.getElementById(loadingId);
loader.setAttribute('src', response.data.url);
loader.setAttribute('_src', response.data.url);
loader.setAttribute('title', response.data.title || '');
loader.setAttribute('alt', response.data.original || '');
loader.removeAttribute('id');
domUtils.removeClasses(loader, 'loadingclass');
}else
{
showErrorLoader && showErrorLoader(json.state);
}
}
}
就可以完美的解决问题了。