I want users to be constrained to only be able to write lists.
With the default ProseMirror list behavior using splitListItem
, hitting enter with an empty list item will break the user out of the list to a paragraph.
Also, hitting backspace at the start of a list will pull a list item out of the list and transform it to a paragraph.
I have replicated the splitListItem
function and have made some modifications to prevent the empty list item behavior, and I suspect that I will need to watch for backspace events to prevent the other behavior.
Is there a simpler way to prevent users from breaking out of a list?