ConstPossible parent nodes that can have the given children. The children need not be direct descendants or real prosemirror nodes since create is what determines how they're created.
The type of the parent (node or "text") where "text" is a string or mark. Determines the call signature of the create function.
Creates the node. Can return undefined to "terminate" the branch being created, the node will be filtered out of the nodes passed to it's parent.
Note also, it is not required to use the children. You can ignore them or use a subset or create different ones if needed (some node types require text and if count returns 0 children will be empty, which can cause issues).
Possible parent nodes that can have the given children. The children need not be direct descendants or real prosemirror nodes since create is what determines how they're created.
The type of the parent (node or "text") where "text" is a string or mark. Determines the call signature of the create function.
Creates the node. Can return undefined to "terminate" the branch being created, the node will be filtered out of the nodes passed to it's parent.
Note also, it is not required to use the children. You can ignore them or use a subset or create different ones if needed (some node types require text and if count returns 0 children will be empty, which can cause issues).