Skip to content

Commit

Permalink
Merge pull request #3895 from ueberdosis/feature/ttCollabProvider
Browse files Browse the repository at this point in the history
Updates @hocuspocus/provider, moves demo to TiptapCollab
  • Loading branch information
janthurau committed Mar 28, 2023
1 parent 3a9b775 commit db0d95d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ts": "tsc --project tsconfig.base.json --noEmit && tsc --project tsconfig.react.json --noEmit && tsc --project tsconfig.vue-2.json --noEmit && tsc --project tsconfig.vue-3.json --noEmit"
},
"dependencies": {
"@hocuspocus/provider": "^1.0.0-alpha.29",
"@hocuspocus/provider": "^1.1.3",
"d3": "^7.3.0",
"fast-glob": "^3.2.11",
"highlight.js": "^11.6.0",
Expand Down
9 changes: 3 additions & 6 deletions demos/src/Examples/CollaborativeEditing/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './styles.scss'

import { HocuspocusProvider } from '@hocuspocus/provider'
import { TiptapCollabProvider } from '@hocuspocus/provider'
import CharacterCount from '@tiptap/extension-character-count'
import Collaboration from '@tiptap/extension-collaboration'
import CollaborationCursor from '@tiptap/extension-collaboration-cursor'
Expand Down Expand Up @@ -60,11 +60,8 @@ const getRandomName = () => getRandomElement(names)
const room = getRandomRoom()

const ydoc = new Y.Doc()
const websocketProvider = new HocuspocusProvider({
url: 'wss://connect.hocuspocus.cloud',
parameters: {
key: 'write_bqgvQ3Zwl34V4Nxt43zR',
},
const websocketProvider = new TiptapCollabProvider({
appId: '7j9y6m10',
name: room,
document: ydoc,
})
Expand Down
9 changes: 3 additions & 6 deletions demos/src/Examples/CollaborativeEditing/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<script>
import { HocuspocusProvider } from '@hocuspocus/provider'
import { TiptapCollabProvider } from '@hocuspocus/provider'
import CharacterCount from '@tiptap/extension-character-count'
import Collaboration from '@tiptap/extension-collaboration'
import CollaborationCursor from '@tiptap/extension-collaboration-cursor'
Expand Down Expand Up @@ -67,11 +67,8 @@ export default {
mounted() {
const ydoc = new Y.Doc()
this.provider = new HocuspocusProvider({
url: 'wss://connect.hocuspocus.cloud',
parameters: {
key: 'write_bqgvQ3Zwl34V4Nxt43zR',
},
this.provider = new TiptapCollabProvider({
appId: '7j9y6m10',
name: this.room,
document: ydoc,
})
Expand Down
34 changes: 20 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db0d95d

Please sign in to comment.