mirror of
https://github.com/docmost/docmost.git
synced 2026-05-15 13:14:11 +08:00
fix: Set isInitialized to force immediate react node view rendering
This commit is contained in:
@@ -166,6 +166,9 @@ export const mainExtensions = [
|
||||
},
|
||||
}).extend({
|
||||
addNodeView() {
|
||||
// Force the react node view to render immediately using flush sync (https://github.com/ueberdosis/tiptap/blob/b4db352f839e1d82f9add6ee7fb45561336286d8/packages/react/src/ReactRenderer.tsx#L183-L191)
|
||||
this.editor.isInitialized = true;
|
||||
|
||||
return ReactNodeViewRenderer(MentionView);
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user