Skip to content

Commit df3d2be

Browse files
committed
refactor: integrate the fragment properly
1 parent c766956 commit df3d2be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/editor/BlockNoteEditor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,10 @@ export class BlockNoteEditor<
956956
if (!prevFragment) {
957957
throw new Error("No Yjs document found");
958958
}
959+
959960
const nextFragment = prevFragment.clone();
960961
const doc = new Y.Doc();
961-
nextFragment._integrate(doc, nextFragment._item!);
962+
doc.getMap().set("cpy", nextFragment);
962963

963964
this.yjsState = {
964965
prevFragment,

0 commit comments

Comments
 (0)