-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
复制word图文突然图片不显示了 #5990
Comments
不太懂,有 word 附件 和 |
但是现在占位图片突然没了,替换base64都不行 |
老师可以贴一下替换路径的代码吗?图文一起复制的话图片会变成‘ file:///’协议的,不允许被读取更不能上传了,我这里卡在“Not allowed to load local resource: file:///” |
本地路径,这是 wps、office 的锅,你可以 setHtml 全局替换相关的 file:/// 协议。具体成因看相关 issue。 |
我给你贴一下我网上看到的然后自己加了异步上传的, async function customUploadImg(file, insertFn) {
} catch (err) { async function customUploadVideo(file) { const editorConfig = { const handleCreated = (editor) => { if (html && rtf) {
} else { /**
let arr = htmlData.match(imgReg); //筛选出所有的img if (!arr || (Array.isArray(arr) && !arr.length)) { let srcArr = []; return srcArr;
const regexPictureHeader = if (images) {
} return result;
return htmlData; function replaceImgUrlAfterUpload(targetStr) {
/**
|
试了下,确实 Microsoft world 的 图片丢失了,需要兼容一下。 |
已在 wangeditor-next 解决 Microsoft World 不展示占位图片的 bug |
以前复制word图文,编辑框会在图片位置留下标签,所以我异步上传替换这个img便签可以实现图文复制。
fk,最近这个img标签突然没了,是不是sb微软打补丁了哇。
The text was updated successfully, but these errors were encountered: