Files
tiptap/packages/core/src/commands/selectAll.ts
2021-06-04 21:56:29 +02:00

18 lines
428 B
TypeScript

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