add new collab test

This commit is contained in:
Philipp Kühn
2019-02-06 10:33:16 +01:00
parent 6a0aaf15e6
commit ac3b95716e
4 changed files with 210 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { Extension } from 'tiptap'
import { collab } from 'prosemirror-collab'
export default class CollabExtension extends Extension {
get name() {
return 'collab'
}
get defaultOptions() {
return {
version: 0,
clientID: Math.floor(Math.random() * 0xFFFFFFFF),
}
}
get plugins() {
return [
collab({
version: this.options.version,
clientID: this.options.clientID,
}),
]
}
}