refactoring
This commit is contained in:
@@ -21,7 +21,9 @@
|
|||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"remark-container": "^0.1.2",
|
"remark-container": "^0.1.2",
|
||||||
"typescript": "^4.0.3",
|
"typescript": "^4.0.3",
|
||||||
"vue-github-button": "^1.1.2"
|
"vue-github-button": "^1.1.2",
|
||||||
|
"y-webrtc": "^10.1.6",
|
||||||
|
"yjs": "^13.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
|
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
"@tiptap/core": "2.x"
|
"@tiptap/core": "2.x"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"y-prosemirror": "^0.3.7",
|
"y-prosemirror": "^0.3.7"
|
||||||
"y-webrtc": "^10.1.6",
|
|
||||||
"yjs": "^13.3.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Extension } from '@tiptap/core'
|
|||||||
import {
|
import {
|
||||||
redo, undo, ySyncPlugin, yUndoPlugin,
|
redo, undo, ySyncPlugin, yUndoPlugin,
|
||||||
} from 'y-prosemirror'
|
} from 'y-prosemirror'
|
||||||
import { keymap } from 'prosemirror-keymap'
|
|
||||||
|
|
||||||
export interface CollaborationOptions {
|
export interface CollaborationOptions {
|
||||||
provider: any,
|
provider: any,
|
||||||
@@ -18,10 +17,12 @@ export default new Extension<CollaborationOptions>()
|
|||||||
.plugins(({ options }) => [
|
.plugins(({ options }) => [
|
||||||
ySyncPlugin(options.type),
|
ySyncPlugin(options.type),
|
||||||
yUndoPlugin(),
|
yUndoPlugin(),
|
||||||
keymap({
|
])
|
||||||
|
.keys(() => {
|
||||||
|
return {
|
||||||
'Mod-z': undo,
|
'Mod-z': undo,
|
||||||
'Mod-y': redo,
|
'Mod-y': redo,
|
||||||
'Mod-Shift-z': redo,
|
'Mod-Shift-z': redo,
|
||||||
}),
|
}
|
||||||
])
|
})
|
||||||
.create()
|
.create()
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
"@tiptap/core": "2.x"
|
"@tiptap/core": "2.x"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"y-prosemirror": "^0.3.7",
|
"y-prosemirror": "^0.3.7"
|
||||||
"y-webrtc": "^10.1.6",
|
|
||||||
"yjs": "^13.3.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user