Why only non-generatable nodes in a required position?

Nodes with default-less attributes are ‘non-generatable’. My question is, why the rule that it is not allowed to put such nodes in a required position in the schema? I expected the node with such a content expression to also be considered non-generatable.

I ask because I just changed a content expression from foo* to foo+ for that specific purpose – I don’t want ProseMirror to ever auto-generate such nodes (which didn’t work of course).

Making nodes non-generatable when any of their children are doesn’t work because, once you have a node of a given type in the document, the system may need to create valid content for it (for example when the user deletes some required child nodes), even if isn’t itself generatable. (A design where such a node would then be removed entirely would have been possible, but probably strictly worse than what we have now, in terms of how annoying it’d be for users.)

1 Like