mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-16 03:39:00 +08:00
25 lines
448 B
JavaScript
25 lines
448 B
JavaScript
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,
|
|
}),
|
|
]
|
|
}
|
|
}
|