mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-01 06:37:51 +08:00
18 lines
442 B
TypeScript
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)
|
|
}
|