mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-14 18:49:02 +08:00
only lift list_item if we are currently in a list
this allows to use lists in blockquotes that are in another list.
This commit is contained in:
parent
a0dae562c2
commit
2291c699ad
@ -18,7 +18,7 @@ export default function toggleList(listType, itemType) {
|
||||
|
||||
const parentList = findParentNode(node => isList(node, schema))(selection)
|
||||
|
||||
if (range.depth >= 1 && parentList) {
|
||||
if (range.depth >= 1 && parentList && range.depth - parentList.depth <= 1) {
|
||||
if (parentList.node.type === listType) {
|
||||
return liftListItem(itemType)(state, dispatch, view)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user