in the editor. I found this ticket: https://github.com/ProseMirror/prosemirror/issues/31 but I could not get it working. Both OrderedList and BulletList use NodeKind.list_item. So my idea was to allow only Text or Paragraph nodes in NodeKind.list_item.
But contains() in ListItem:
export class ListItem extends Block {
get kind() { return NodeKind.list_item }
get contains() { return NodeKind.text }
}
It might be easier to make list items contain only paragraphs (though that will also require giving paragraph a new, specific kind). To make list items contain text you’ll have to make them textblocks (i.e. you’ll need a new class that inherits from Textblock).