Hello, Is it possible to wrap mutliple nodes inside a decoration ? I have seen that the static node method of Decoration class allow to do it using the nodeName attribute but it only wrap around one node.
Thank you !
Hello, Is it possible to wrap mutliple nodes inside a decoration ? I have seen that the static node method of Decoration class allow to do it using the nodeName attribute but it only wrap around one node.
Thank you !
Inline decorations can do this. For block content, it doesn’t exist.
I’m having a similar situation here with needing to group some block nodes in a decoration.
We’re making heavy use of a customized prosemirror-changeset for whole word and block diffs, and staging some changes for the user to accept/reject. Groups of changed blocks can be accepted granularly, and the designs have a border rectangle around each of these sections. I had a decent hack with using display: none on nodesBetween, then using a widget with insertion and deletion content, but I’m trying to do it properly, and I’m having trouble.
Would you happen to have any advice for doing something like this?
I’ve used popperjs for tracking positions and displaying menus while scrolling, but popperjs is intended for tooltips and not really outlining blocks in a document.
Me too, but this feature might not be achievable. My current workaround is to calculate all the nodes in the group, add Node decorations, and then use some clunky CSS to make them look the same.
Same, settled on nodesBetween, isBlock and checking parent is the doc node, then manually adding borders for the first, last, and middle blocks. So what appears to be one border is actually lots of little ones pieced together. Something that no user will ever appreciate