We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecf5990 commit a353968Copy full SHA for a353968
packages/core/src/editor/BlockNoteEditor.ts
@@ -930,7 +930,7 @@ export class BlockNoteEditor<
930
const ret = oldCreateAndFill.apply(this.pmSchema.nodes.doc, args)!;
931
932
// create a copy that we can mutate (otherwise, assigning attrs is not safe and corrupts the pm state)
933
- const jsonNode = ret.toJSON();
+ const jsonNode = JSON.parse(JSON.stringify(ret.toJSON()));
934
jsonNode.content[0].content[0].attrs.id = "initialBlockId";
935
936
cache = Node.fromJSON(this.pmSchema, jsonNode);
0 commit comments