diff --git a/packages/extension-history/index.ts b/packages/extension-history/index.ts index df55bcca..83f7c1fd 100644 --- a/packages/extension-history/index.ts +++ b/packages/extension-history/index.ts @@ -10,7 +10,7 @@ import { declare module '@tiptap/core/src/Editor' { interface Editor { undo(): Editor, - undo(): Editor, + redo(): Editor, } } @@ -30,6 +30,14 @@ export default class History extends Extension { }) } + keys() { + return { + 'Mod-z': () => this.editor.undo(), + 'Mod-y': () => this.editor.redo(), + 'Shift-Mod-z': () => this.editor.redo(), + } + } + plugins() { return [ history()