Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

architecture: fix contentcomponent mounting #832

Closed
YousefED opened this issue Jun 11, 2024 · 0 comments · Fixed by #451
Closed

architecture: fix contentcomponent mounting #832

YousefED opened this issue Jun 11, 2024 · 0 comments · Fixed by #451
Labels
architecture bug Something isn't working prio:high High priority

Comments

@YousefED
Copy link
Collaborator

Our EditorContent is a replacement for Tiptaps editorcontent. Although it cleans the original implementation quite a bit, there still seem to be some problems in how it's setup. See:

closes #750
closes #732

(Note that a workaround has been implemented here (#788), but I think that should actually be reverted when working on this issue (contentComponent should not be undefined whenever we call renderToDOMSpec).

My first thoughts are that we should clean the way the contentcomponent is set on the tiptap editor.

Ideas of better approach (open to suggestions):
a) useImperativeHandle instead of useEffect in EditorContent
b) when this EditorContent ref is available (in BlockNoteView) set it on the editor (as contentComponent) c) only call editor._tiptapEditor.mount` after step (b)

Of course, also need to take cleanup into account

@YousefED YousefED added bug Something isn't working architecture labels Jun 11, 2024
@matthewlipski matthewlipski added the prio:high High priority label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture bug Something isn't working prio:high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants