Skip to content

Commit e82fdb1

Browse files
committed
refactor: integrate the fragment properly
1 parent 3eab6e7 commit e82fdb1

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
@@ -955,9 +955,10 @@ export class BlockNoteEditor<
955955
if (!prevFragment) {
956956
throw new Error("No Yjs document found");
957957
}
958+
958959
const nextFragment = prevFragment.clone();
959960
const doc = new Y.Doc();
960-
nextFragment._integrate(doc, nextFragment._item!);
961+
doc.getMap().set("cpy", nextFragment);
961962

962963
this.yjsState = {
963964
prevFragment,

0 commit comments

Comments
 (0)