I had a bug recently the revolved around the return value of
update on a node view. It took me a while to figure it out and I was wondering why the behaviour I observed happened.
Here is an example that I created and there’s a toy plugin there that, on instantiation (and subsequent updates), make sure every other nodes is of type x (and if not adds one in).
This works fine when
update returns false (there are two nodeViewElements surrounded by textElements) but seems to “split” the some node views (and display two copies of the same node view) when returning true. It’s not too clear from the docs what will happen in either case, although I’m assuming if I return false then PM expects that I’ve moved the node in the document myself in someway?
Any clue would be great!