mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-27 11:27:49 +08:00
18 lines
482 B
TypeScript
18 lines
482 B
TypeScript
import { deleteSelection as originalDeleteSelection } from 'prosemirror-commands'
|
|
import { RawCommands } from '../types'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands<ReturnType> {
|
|
deleteSelection: {
|
|
/**
|
|
* Delete the selection, if there is one.
|
|
*/
|
|
deleteSelection: () => ReturnType,
|
|
}
|
|
}
|
|
}
|
|
|
|
export const deleteSelection: RawCommands['deleteSelection'] = () => ({ state, dispatch }) => {
|
|
return originalDeleteSelection(state, dispatch)
|
|
}
|