import { RawCommands } from '../types.js' declare module '@sse-editor/core' { interface Commands { selectAll: { /** * Select the whole document. */ selectAll: () => ReturnType, } } } export const selectAll: RawCommands['selectAll'] = () => ({ tr, commands }) => { return commands.setTextSelection({ from: 0, to: tr.doc.content.size, }) }