I’m playing with your image upload example and the problem that I have with it is that in order to add the uploaded image to the document, I have to remove the decoration first. That may cause a layout shift because I’m removing an img
tag (my decoration) and adding another img
tag (node), which is not good for UX.
Can I somehow convert a widget decoration to a node without removing anything from the DOM? I mean, I want to re-use the decorations’ DOM (which is an img
tag with a data-url as its src
) for the new node and only change some of its attributes.