Real-time collaboration with Y-js #104
Unanswered
junoriosity
asked this question in
Q&A
Replies: 2 comments 4 replies
-
Would be great to hear if that is possible. 🙂 |
Beta Was this translation helpful? Give feedback.
4 replies
-
i made it by read tiptap's collaboration content here are some frontend code import {Collaboration} from "@tiptap/extension-collaboration";
import {CollaborationCursor} from "@tiptap/extension-collaboration-cursor";
import { HocuspocusProvider } from '@hocuspocus/provider'
import {Editor} from "novel";
....
const provider = new HocuspocusProvider({
url: 'ws://127.0.0.1:1234',
name: 'example-document',
// document: ydoc,
})
....
<Editor
// must set null
defaultValue={""}
// must disable
disableLocalStorage={true}
extensions={
[
StarterKit.configure({
// The Collaboration extension comes with its own history handling
history: false,
}),
Collaboration.configure({
document: provider.document,
}),
CollaborationCursor.configure({
provider: provider,
user: {
name: Math.floor(Math.random()*10).toString(),
color: '#f783ac',
},
})
]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to do some real-time collaboration via Yjs?
I know it is possible with Prosemirror and Tiptap (https://github.com/yjs/yjs) and also with Blocknote (https://www.blocknotejs.org/docs/real-time-collaboration), but is it possible as well with novel?
It would be terrific if that is the case. 🙂
Beta Was this translation helpful? Give feedback.
All reactions