add keys to history
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
declare module '@tiptap/core/src/Editor' {
|
declare module '@tiptap/core/src/Editor' {
|
||||||
interface Editor {
|
interface Editor {
|
||||||
undo(): 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() {
|
plugins() {
|
||||||
return [
|
return [
|
||||||
history()
|
history()
|
||||||
|
|||||||
Reference in New Issue
Block a user