Closed impactvelocity closed 3 years ago
Hey, unfortunately this seems to be impossible with ProseMirror right now :( https://discuss.prosemirror.net/t/how-to-deal-with-with-nodes-being-dropped-during-parsing/1962 https://discuss.prosemirror.net/t/hoist-elements-when-parsing-dom/2785
Ah, okay, no worries! I am working on a little parse script that will fix it so TipTap is happy. :)
Thank you!!!
Thanks for reporting! Let me know if you run into other things, I’d love to document it for others!
What happens? Moved from quilljs to TipTap (react), and everything is great. However, quill adds a p tag around everything it seems. So an img tag is wrapped inside of a p tag. Inside TipTap it replaces the image with
<br />
. I think thats because TipTap adds images not wrapped in a P tag.What behavior did you expect? It should show the image even if it is in a p tag, or remove the p tag?
My workaround, which I haven't coded yet, would be to parse the older html, find image tags and remove any P wrapper. But maybe tiptap has a solution for this already?
Do you have a screenshot? Video: https://share.getcloudapp.com/o0uEx60Z
:)