Deleting empty parent of nested list items

I’m trying to implement similar list functionality as Google Docs, where deleting a parent list item in a bulleted/ordered list removes the list item but keeps the nested items below. Here’s a gif as an example of Google Docs:


In our Prosemirror implementation, we’re getting the following result, with the base keymap backspace:


Our list items are defined as

  nodes: addListNodes(defaultSchema.spec.nodes, 'paragraph block*', 'block'),

using the default addListNodes:

ordered_list: add(orderedList, {content: "list_item+", group: listGroup}),
bullet_list: add(bulletList, {content: "list_item+", group: listGroup}),
list_item: add(listItem, {content: itemContent})

I’m just not sure how to allow deleting empty parent list items and retain the nested lists inside… We’ve tried with adding rules for lifting list items, joining backward. The closest I can get is setting the listItem content field to “inline*” but that has other unintended side-effects.

Has anyone tried to implement something similar? Thanks

In a representation like ProseMirror’s, having a nested list without a parent list just doesn’t make sense, so I don’t think this is something you’ll be able to implement in a reasonable way.