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