fix history for collab demo

This commit is contained in:
Philipp Kühn 2020-12-01 14:55:11 +01:00
parent d8322d2e2e
commit 5ae9d8cca4
3 changed files with 6 additions and 4 deletions

View File

@ -82,7 +82,7 @@ export default {
this.editor = new Editor({
extensions: [
...defaultExtensions(),
...defaultExtensions().filter(extension => extension.config.name !== 'history'),
Collaboration.configure({
provider,
}),

View File

@ -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),
}
},

View File

@ -7,6 +7,8 @@ export interface HistoryOptions {
}
const History = Extension.create({
name: 'history',
defaultOptions: <HistoryOptions>{
depth: 100,
newGroupDelay: 500,