mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
fix history for collab demo
This commit is contained in:
parent
d8322d2e2e
commit
5ae9d8cca4
@ -82,7 +82,7 @@ export default {
|
||||
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
...defaultExtensions().filter(extension => extension.config.name !== 'history'),
|
||||
Collaboration.configure({
|
||||
provider,
|
||||
}),
|
||||
|
@ -26,9 +26,9 @@ const Collaboration = Extension.create({
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
'Mod-z': undo,
|
||||
'Mod-y': redo,
|
||||
'Mod-Shift-z': redo,
|
||||
'Mod-z': () => undo(this.editor.state),
|
||||
'Mod-y': () => redo(this.editor.state),
|
||||
'Mod-Shift-z': () => redo(this.editor.state),
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -7,6 +7,8 @@ export interface HistoryOptions {
|
||||
}
|
||||
|
||||
const History = Extension.create({
|
||||
name: 'history',
|
||||
|
||||
defaultOptions: <HistoryOptions>{
|
||||
depth: 100,
|
||||
newGroupDelay: 500,
|
||||
|
Loading…
Reference in New Issue
Block a user