Files
tiptap/packages/core/src/commands/selectParentNode.ts
2020-08-17 16:38:13 +02:00

16 lines
361 B
TypeScript

import { Editor } from '../Editor'
import { selectParentNode } from 'prosemirror-commands'
type SelectParentNodeCommand = () => Editor
declare module '../Editor' {
interface Editor {
selectParentNode: SelectParentNodeCommand,
}
}
export default (next: Function, { state, view }: Editor) => () => {
selectParentNode(state, view.dispatch)
next()
}