百度编辑器上传图片排序问题
修改3个位置
第一个
\ueditor1.4.3.3\dialogs\image\image.js
在722行左右,可搜索 _this.imageList.push(json);
_this.imageList.push(json);
改成
_this.imageList[$file.index()] = json;
第2个
778行左右,可搜索 getInsertList: function ()
添加代码
if(data == undefined){//源自于对line:(722或721)的修改,避免部分图片上传失败,或者选择的图片不符合规范不能参与上传而造成imageList数组中出现的undefined项 continue; }
第3个
\ueditor1.4.3.3\dialogs\attachment\attachment.js
778行左右,可搜索 _this.fileList.push(json);
_this.fileList.push(json);
改成
_this.fileList[$file.index()] = json;
最后,清理一下浏览缓存,测试Ok