mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-28 20:20:09 +08:00
18 lines
451 B
TypeScript
18 lines
451 B
TypeScript
import { undoInputRule as originalUndoInputRule } from 'prosemirror-inputrules'
|
|
import { RawCommands } from '../types'
|
|
|
|
declare module '@tiptap/core' {
|
|
interface Commands<ReturnType> {
|
|
undoInputRule: {
|
|
/**
|
|
* Undo an input rule.
|
|
*/
|
|
undoInputRule: () => ReturnType,
|
|
}
|
|
}
|
|
}
|
|
|
|
export const undoInputRule: RawCommands['undoInputRule'] = () => ({ state, dispatch }) => {
|
|
return originalUndoInputRule(state, dispatch)
|
|
}
|