fix: fix a bug in detecting a current list in toggleList command
This commit is contained in:
@@ -18,7 +18,7 @@ declare module '@tiptap/core' {
|
|||||||
export const toggleList: RawCommands['toggleList'] = (listTypeOrName, itemTypeOrName) => ({
|
export const toggleList: RawCommands['toggleList'] = (listTypeOrName, itemTypeOrName) => ({
|
||||||
editor, tr, state, dispatch, chain, commands, can,
|
editor, tr, state, dispatch, chain, commands, can,
|
||||||
}) => {
|
}) => {
|
||||||
const { extensions } = editor.options
|
const { extensions } = editor.extensionManager
|
||||||
const listType = getNodeType(listTypeOrName, state.schema)
|
const listType = getNodeType(listTypeOrName, state.schema)
|
||||||
const itemType = getNodeType(itemTypeOrName, state.schema)
|
const itemType = getNodeType(itemTypeOrName, state.schema)
|
||||||
const { selection } = state
|
const { selection } = state
|
||||||
|
|||||||
Reference in New Issue
Block a user