Five-great / tinymce-plugins

This is tinymce plugins
249 stars 81 forks source link

importword一个问题。 #30

Open tjwecreate opened 2 years ago

tjwecreate commented 2 years ago

多次引用word时,有时会报错。我没有源代码,只有编译压缩后的。 else{var d=a[0].name;"docx"==d.substr(d.lastIndexOf(".")+1)? 这行代码,有时候 a=[],所以 a[0].name会报错。 修改办法: 把 a.on("focusin remove",e);b.click()})}这里的a.on("focusin remove",e);移动到前边的 b.addEventListener("change",function(f){d(Array.prototype.slice.call(f.target.files));})这个函数的d函数后边 b.addEventListener("change", function(f) { d(Array.prototype.slice.call(f.target.files)); a.on("focusin remove", e); }); 总之就是a.on("focusin remove",e)造成程序提前返回,所以后边的程序没有得到文件而报错。 希望作者改进一下。

Five-great commented 2 years ago

好的 感谢反馈

Five-great commented 2 years ago

目前已放弃这一版本 重构了此插件 详情可以见 https://tinymce-plugin.gitee.io/packages/tp-importword/introduction.html @tjwecreate