refactoring
This commit is contained in:
@@ -2,7 +2,6 @@ import { Extension } from '@tiptap/core'
|
||||
import {
|
||||
redo, undo, ySyncPlugin, yUndoPlugin,
|
||||
} from 'y-prosemirror'
|
||||
import { keymap } from 'prosemirror-keymap'
|
||||
|
||||
export interface CollaborationOptions {
|
||||
provider: any,
|
||||
@@ -18,10 +17,12 @@ export default new Extension<CollaborationOptions>()
|
||||
.plugins(({ options }) => [
|
||||
ySyncPlugin(options.type),
|
||||
yUndoPlugin(),
|
||||
keymap({
|
||||
])
|
||||
.keys(() => {
|
||||
return {
|
||||
'Mod-z': undo,
|
||||
'Mod-y': redo,
|
||||
'Mod-Shift-z': redo,
|
||||
}),
|
||||
])
|
||||
}
|
||||
})
|
||||
.create()
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
"@tiptap/core": "2.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"y-prosemirror": "^0.3.7",
|
||||
"y-webrtc": "^10.1.6",
|
||||
"yjs": "^13.3.2"
|
||||
"y-prosemirror": "^0.3.7"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user