diff --git a/examples/Components/Routes/Collaboration/Collab.js b/examples/Components/Routes/Collaboration/Collab.js deleted file mode 100644 index a59328b25..000000000 --- a/examples/Components/Routes/Collaboration/Collab.js +++ /dev/null @@ -1,43 +0,0 @@ -import { Extension } from 'tiptap' -import { collab, sendableSteps } from 'prosemirror-collab' -import { debounce } from 'lodash-es' - -export default class CollabExtension extends Extension { - - get name() { - return 'collab' - } - - init() { - this.editor.on('update', ({ state }) => { - this.getSendableSteps(state) - }) - } - - get defaultOptions() { - return { - version: 0, - clientID: Math.floor(Math.random() * 0xFFFFFFFF), - debounce: 250, - onSend: () => {}, - } - } - - get plugins() { - return [ - collab({ - version: this.options.version, - clientID: this.options.clientID, - }), - ] - } - - getSendableSteps = debounce(state => { - const sendable = sendableSteps(state) - - if (sendable) { - this.options.onSend(sendable) - } - }, this.options.debounce) - -} diff --git a/examples/Components/Routes/Collaboration/index.vue b/examples/Components/Routes/Collaboration/index.vue index f7adc7cb4..293541e54 100644 --- a/examples/Components/Routes/Collaboration/index.vue +++ b/examples/Components/Routes/Collaboration/index.vue @@ -10,9 +10,7 @@