tiptap/packages/core/src/commands/undoInputRule.ts
2021-02-16 11:27:58 +01:00

18 lines
442 B
TypeScript

import { undoInputRule as originalUndoInputRule } from 'prosemirror-inputrules'
import { Command, Commands } from '../types'
declare module '@tiptap/core' {
interface AllCommands {
undoInputRule: {
/**
* Undo an input rule.
*/
undoInputRule: () => Command,
}
}
}
export const undoInputRule: Commands['undoInputRule'] = () => ({ state, dispatch }) => {
return originalUndoInputRule(state, dispatch)
}