fix build for now

This commit is contained in:
Philipp Kühn
2020-11-10 16:29:31 +01:00
parent 960368db0e
commit d3b4e7a1d4
77 changed files with 28 additions and 64 deletions

View File

@@ -0,0 +1,39 @@
import { createExtension } from '@tiptap/core'
import {
redo, undo, ySyncPlugin, yUndoPlugin,
} from 'y-prosemirror'
export interface CollaborationOptions {
provider: any,
type: any,
}
const Collaboration = createExtension({
defaultOptions: <CollaborationOptions>{
provider: null,
type: null,
},
addProseMirrorPlugins() {
return [
ySyncPlugin(this.options.type),
yUndoPlugin(),
]
},
addKeyboardShortcuts() {
return {
'Mod-z': undo,
'Mod-y': redo,
'Mod-Shift-z': redo,
}
},
})
export default Collaboration
declare module '@tiptap/core/src/Editor' {
interface AllExtensions {
Collaboration: typeof Collaboration,
}
}