Okay, I finally found what causes it – and no, it seems it’s not specific to that prosemirror-view version. Basically, when there’s newline (\n) characters inside text nodes inside paragraphs that are imported raw (not from a DOM), ProseMirror seems to try to remove them when editing it. This seems something ProseMirror could have better safety around. For example, it seems that this isn’t detected when calling Node.check(). At the very least, if ProseMirror had thrown a console.warn about it, it would’ve saved me a lot of time. ![]()
Repro: CodeSandbox
My next steps then are making sure that instead of having \n, they get split into separate paragraphs. (This happened because the ProseMirror JSON was generated by the backend)