Questions tagged [yjs]

2 questions
0
votes
1 answer

how to get the doc text in y-websocket server side

I want to flush the yjs document into disk in y-websocket server side, this is how I do it: const handleFileSync = async (docName, ydoc) => { try { let fileContent = await getFileJsonData(docName) if (!fileContent) { …
Dolphin
  • 29,069
  • 61
  • 260
  • 539
0
votes
0 answers

how to switch the doc when using yjs to implement an online collaboration editor without websocket reconnection

I am trying to using yjs "yjs": "^13.6.7" https://github.com/yjs/yjs to implement an online collaboration editor. This is how I initial the yjs in react function component: import { useRef } from "react"; import { EditorView } from…
Dolphin
  • 29,069
  • 61
  • 260
  • 539