tiptap/packages/core/src/extensions/selectParentNode.ts

20 lines
470 B
TypeScript
Raw Normal View History

2020-10-27 19:37:00 +08:00
import { selectParentNode } from 'prosemirror-commands'
2020-10-23 16:44:30 +08:00
import { Command } from '../Editor'
import { createExtension } from '../Extension'
export const SelectParentNode = createExtension({
addCommands() {
return {
selectParentNode: (): Command => ({ state, dispatch }) => {
2020-10-27 19:37:00 +08:00
return selectParentNode(state, dispatch)
2020-10-23 16:44:30 +08:00
},
}
},
})
declare module '../Editor' {
interface AllExtensions {
SelectParentNode: typeof SelectParentNode,
}
}