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

18 lines
422 B
TypeScript

import { selectAll as originalSelectAll } from 'prosemirror-commands'
import { Command, RawCommands } from '../types'
declare module '@tiptap/core' {
interface Commands {
selectAll: {
/**
* Select the whole document.
*/
selectAll: () => Command,
}
}
}
export const selectAll: RawCommands['selectAll'] = () => ({ state, dispatch }) => {
return originalSelectAll(state, dispatch)
}