Structured document example?

I have been beating my head against this and so far, all of the various questions posed by others don’t quite help me solve this …

I have a doc structure as follows: doc: notetitle: paragraph notebody?: block+

The idea being that a note always has a title paragraph and then any number of blocks within the (optional) note body.

The problem I’m having is that I cannot get the Enter key at the end of the note title paragraph to create the notebody and the first paragraph.

After much googling and experimentation, I think I need to handle the Enter key myself on my nodetitle Node, adding a new notebody. But, then I’m baffled as to how to get the cursor to advance into that notebody and cause a new block to be created … what kind of block? A paragraph? What if they want the first block to be some other block type, such a horizontal rule?

Does anyone have a working example of this kind of ‘structured’ document with a title and a body?

Making the notetitle node a textblock (with inline content) directly, rather than having it wrap a single paragraph, might make the default splitBlock command work.

As for what kind of block to create in a custom command, Enter is generally expected to create a new ‘generic’ textblock, so a paragraph seems reasonable.