You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
import * as Y from "yjs";
import { WebsocketProvider } from "y-websocket";
// ...
const doc = new Y.Doc();
const provider = new WebsocketProvider(
"wss://demos.yjs.dev", // 官方demo的WebSocket地址
"your-room-name", // 替换为您想要的房间名称
doc
);
const editor = useCreateBlockNote({
// ...
collaboration: {
// The Yjs Provider responsible for transporting updates:
provider,
// Where to store BlockNote data in the Y.Doc:
fragment: doc.getXmlFragment("document-store"),
// Information (name and color) for this user:
user: {
name: "My Username",
color: "#ff0000",
},
},
// ...
});
Misc
Node version: 16.15.0、18.18.0
Package manager: 0.15.3、0.15.4
Browser:
I'm a sponsor and would appreciate if you could look into this sooner than later 💖
The text was updated successfully, but these errors were encountered:
Describe the bug
仿照官方文档"https://www.blocknotejs.org/docs/advanced/real-time-collaboration"中的示例
将"y-webrtc"修改为"y-websocket",其余部分不变。
用户a编辑文档A并且新建了多个block同时用户b进入文档A就会报这个错误。
如果用户a修改文档后把光标点击到第一个block上,用户b进入文档A就不会报这个错误。
我认为是光标的读取获取存在bug
To Reproduce
import * as Y from "yjs";
import { WebsocketProvider } from "y-websocket";
// ...
const doc = new Y.Doc();
const provider = new WebsocketProvider(
"wss://demos.yjs.dev", // 官方demo的WebSocket地址
"your-room-name", // 替换为您想要的房间名称
doc
);
const editor = useCreateBlockNote({
// ...
collaboration: {
// The Yjs Provider responsible for transporting updates:
provider,
// Where to store BlockNote data in the Y.Doc:
fragment: doc.getXmlFragment("document-store"),
// Information (name and color) for this user:
user: {
name: "My Username",
color: "#ff0000",
},
},
// ...
});
Misc
The text was updated successfully, but these errors were encountered: