add new collab test
This commit is contained in:
24
examples/Components/Routes/Collaboration3/Collab.js
Normal file
24
examples/Components/Routes/Collaboration3/Collab.js
Normal 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,
|
||||
}),
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user