fix: editor crash on open

This commit is contained in:
reya
2024-05-28 14:43:34 +07:00
parent 5ca9444358
commit 32f3315344
7 changed files with 666 additions and 511 deletions

View File

@@ -60,17 +60,10 @@ export const insertMention = (
name: contact.profile.name || contact.profile.display_name || "anon",
children: [text],
};
const extraText = [
{
type: "paragraph",
children: [text],
},
];
// @ts-ignore, idk
ReactEditor.focus(editor);
Transforms.insertNodes(editor, mention);
Transforms.insertNodes(editor, extraText);
};
export const insertNostrEvent = (