16 lines
361 B
TypeScript
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()
|
|
}
|