Will setNodeMarkUp remove decoration at same pos?

I’m using setNodeMarkup to update the Node being decorated and use DecorationSet.map to update the decorations.

After updating the Node attributes, the decoration of Node is deleted.

Is that the expected behavior? How to update attrs only?

setNodeMarkup will replace the opening token for the node with a new one, which causes decoration set mapping to discard any node decorations on that node. There’s currently no way to update only attributes, but you could write a custom Step subclass that does this and (like mark-related steps) doesn’t show any replacements in its step map.

1 Like

OK! Thank you!