I fell into this error just like the previous guy.
I have been on it for 2days now
Is there a doc
node defined in this.nodes
?
… Okay. If you don’t provide a node that matches the top node name, you’re going to get this error. To solve the error, make sure the top node name (which defaults to "doc"
) exists. That seems pretty obvious.
Please what a topnode? having been scanning through your code on GitHub
A full document is just a node. The document content is represented as the top-level node’s child nodes. Typically, it’ll contain a series of block nodes, some of which may be textblocks that contain inline content. But the top-level node may also be a textblock itself, so that the document contains only inline content.
Schemas
Each ProseMirror document has a schema associated with it. The schema describes the kind of nodes that may occur in the document, and the way they are nested. For example, it might say that the top-level node can contain one or more blocks, and that paragraph nodes can contain any number of inline nodes, with any marks applied to them.
honestly, the Prosemirror project is really cool, and on my document application, I have learned a lot about javascript virtual dom, adding to my previous knowledge.
Have you guys written any books yet, I would love to read and learn more