diff --git a/examples/Components/Routes/Collaboration3/Collab.js b/examples/Components/Routes/Collaboration3/Collab.js new file mode 100644 index 000000000..21dc7255f --- /dev/null +++ b/examples/Components/Routes/Collaboration3/Collab.js @@ -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, + }), + ] + } +} diff --git a/examples/Components/Routes/Collaboration3/index.vue b/examples/Components/Routes/Collaboration3/index.vue new file mode 100644 index 000000000..cac658d83 --- /dev/null +++ b/examples/Components/Routes/Collaboration3/index.vue @@ -0,0 +1,176 @@ + + + diff --git a/examples/Components/Subnavigation/index.vue b/examples/Components/Subnavigation/index.vue index e49ef25b3..1ff9f9057 100644 --- a/examples/Components/Subnavigation/index.vue +++ b/examples/Components/Subnavigation/index.vue @@ -54,6 +54,9 @@ Collaboration 2 + + Collaboration 3 + diff --git a/examples/main.js b/examples/main.js index 22ea43971..cd1249367 100644 --- a/examples/main.js +++ b/examples/main.js @@ -138,6 +138,13 @@ const routes = [ githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Collaboration2', }, }, + { + path: '/collaboration3', + component: () => import('Components/Routes/Collaboration3'), + meta: { + githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Collaboration3', + }, + }, ] const router = new VueRouter({