tiptap/packages/core/src/commands/selectNodeBackward.ts
2021-02-16 18:39:37 +01:00

18 lines
482 B
TypeScript

import { selectNodeBackward as originalSelectNodeBackward } from 'prosemirror-commands'
import { Command, RawCommands } from '../types'
declare module '@tiptap/core' {
interface Commands {
selectNodeBackward: {
/**
* Select a node backward.
*/
selectNodeBackward: () => Command,
}
}
}
export const selectNodeBackward: RawCommands['selectNodeBackward'] = () => ({ state, dispatch }) => {
return originalSelectNodeBackward(state, dispatch)
}