This issue was observed when pasting a single table. When parsing the table, if it contains a cell without any content, DOMParser.parseSlice does not add an empty paragraph to that empty cell as defined in the schema. However, if the parsing is done using DOMParser.parse or if the first pasted element is not a table but a paragraph, then the parsing is correct and an empty paragraph is added to the empty cell.
This is how parseSlice is specified—it leaves the slice open at the sides, meaning those open nodes are partial nodes and will not have required content added, because they are assumed to be attached to some other partial node of that type before becoming part of a document. Use parse if you want to parse a full node.
Actually, this issue arises when attempting to copy and paste a single table. I mentioned parseSlice because I noticed that parseFromClipboard uses it to parse the content that is pasted. I actually was able to reproduce this issue in the ProseMirror table demo: the paste operation works fine, but when dragging columns, an error occurs with the message ‘Invalid content for node type table_cell’. Additionally, it becomes impossible to insert any content into the cell with the missing content.
Hence, I am wondering if this behavior is expected. It is possible that I may have misunderstood the problem, and the issue might not be directly related to parseSlice .