After merging two cells in a table, it looks like the merged cell retains the node size of the left or right cell instead of having a node size of both cells or at least bigger than one of the cells. This is causing problems when we try to use setNodeMarkup to style the merged cell. Am I thinking correctly?
By node size you mean .nodeSize? That doesn’t need to be updated on the side of the command code—creating a transaction that merges nodes will cause a new node with the correct size to be created when the transaction is applied. Node objects are immutable, so the old objects won’t appear in the new document, and will indeed continue to have their original size.
Yes. Whenever I try to style a table with merged cells, I keep getting a RangeError “No node at given position”. Whenever I style a table with no merged cells, all is good. But when I merge two cells, then it can’t find a node, or if I style it, it works fine but goes back to unmerged cells . But I think I’m confused between editor.state and editor.view.state. Please what are the differences? Thank you.