This commit is contained in:
Philipp Kühn
2021-01-29 00:24:31 +01:00
parent 89deb4c615
commit f71a51cbb0

View File

@@ -53,7 +53,8 @@ export const splitListItem = (typeOrName: string | NodeType): Command => ({ stat
}
// Add a second list item with an empty default start node
wrap = wrap.append(Fragment.from(type.createAndFill() || undefined))
const nextType = type.contentMatch.defaultType?.createAndFill($from.node().attrs) || undefined
wrap = wrap.append(Fragment.from(type.createAndFill(null, nextType) || undefined))
const tr = state.tr.replace(
$from.before(keepItem ? undefined : -1),