Skip to content
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

只要我新增图片之后,在重新setHtml就会报错 #5955

Open
wangyunhao993 opened this issue Sep 20, 2024 · 5 comments
Open

只要我新增图片之后,在重新setHtml就会报错 #5955

wangyunhao993 opened this issue Sep 20, 2024 · 5 comments

Comments

@wangyunhao993
Copy link

bug 描述

vue3项目用cdn加载的wangEditor,我新增上传照片,然后然后清楚内容, 在重新setHtml上次的内容就会报错,然后没有加载内容

你预期的样子是?

不要报错,且正确加载内容

系统和浏览器及版本号

谷歌最新版浏览器

  • 操作系统
  • win11
  • 浏览器和版本

wangEditor 版本

最新版
请输入内容……

demo 能否复现该 bug ?

能/不能

在线 demo

请尽量提供在线 demo (推荐以下网站),帮助我们最低成本复现 bug

最小成本的复现步骤

(请告诉我们,如何最快的复现该 bug)

  • 步骤一
  • 步骤二
  • 步骤三
@cycleccc
Copy link

录个视频看下,报错信息贴一下,最好有最小复现 demo

@wangyunhao993
Copy link
Author

@wangyunhao993
Copy link
Author

报错信息,只复制一半
Error: Cannot find a descendant at path [0,4] in node: {"children":[{"type":"paragraph","children":[{"text":""}]}],"operations":[{"type":"set_selection","properties":null,"newProperties":{"anchor":{"path":[0,4],"offset":0},"focus":{"path":[0,4],"offset":0}}}],"selection":{"anchor":{"path":[0,4],"offset":0},"focus":{"path":[0,4],"offset":0}},"marks":null,"id":"wangEditor-1","isDestroyed":false,"isFullScreen":false,"history":{"undos":[[{"type":"remove_node","path":[0],"node":{"type":"paragraph","children":[{"text":""}]}},{"type":"insert_node","path":[0],"node":{"type":"paragraph","children":[{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260366e0029bce14e.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260366e0029bce14e.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260466e0029c544bc.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260466e0029c544bc.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260466e0029ca4097.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260466e0029ca4097.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260566e0029d2eea0.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260566e0029d2eea0.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260566e0029d86b86.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260566e0029d86b86.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260566e0029dee9ad.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260566e0029dee9ad.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260666e0029e590b8.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260666e0029e590b8.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260666e0029eb28e0.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260666e0029eb28e0.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260666e0029ef41f8.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260666e0029ef41f8.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260766e0029f3a0c4.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260766e0029f3a0c4.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260766e0029faa2a2.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260766e0029faa2a2.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260866e002a06dd72.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260866e002a06dd72.jpg","style":{"width":"","height":""},"children":[{"text":""}]},{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260866e002a0e3e92.jpg","alt":"桥溪村","href":"https://oss.exchain.cc/picture/20240910/2024091016260866e002a0e3e92.jpg","style":{"width":"","height":""},"children":[{"text":""}]}]}},{"type":"insert_node","path":[0,0],"node":{"text":""}},{"type":"insert_node","path":[0,2],"node":{"text":""}},{"type":"insert_node","path":[0,4],"node":{"text":""}},{"type":"insert_node","path":[0,6],"node":{"text":""}},{"type":"insert_node","path":[0,8],"node":{"text":""}},{"type":"insert_node","path":[0,10],"node":{"text":""}},{"type":"insert_node","path":[0,12],"node":{"text":""}},{"type":"insert_node","path":[0,14],"node":{"text":""}},{"type":"insert_node","path":[0,16],"node":{"text":""}},{"type":"insert_node","path":[0,18],"node":{"text":""}},{"type":"insert_node","path":[0,20],"node":{"text":""}},{"type":"insert_node","path":[0,22],"node":{"text":""}},{"type":"insert_node","path":[0,24],"node":{"text":""}},{"type":"insert_node","path":[0,26],"node":{"text":""}}],[{"type":"remove_node","path":[0,1],"node":{"type":"image","src":"https://oss.exchain.cc/picture/20240910/2024091016260366e0029bce14e.jpg","alt":"桥溪

@wangyunhao993
Copy link
Author

我这是项目里面的代码,不好抽出搞domo

@cycleccc
Copy link

估计还是和 dialog 里面没销毁有关,你试试销毁dialog,或是等我周末做个复现,wangeditor嵌入dialog报错挺多人提的,我抽空解决下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants