Skip to content

Consider rendering menus within editor DOM #172

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

Closed
YousefED opened this issue Apr 18, 2023 · 2 comments
Closed

Consider rendering menus within editor DOM #172

YousefED opened this issue Apr 18, 2023 · 2 comments
Assignees
Labels

Comments

@YousefED
Copy link
Collaborator

We currently append them to body. We should consider to position them within the dom of the editor. This could fix some manual-position issues like:

#167 (review)

@YousefED
Copy link
Collaborator Author

Possible related: #189

@matthewlipski
Copy link
Collaborator

Some findings from looking into this issue:

  • TipTap extensions get initialized before the editor itself, so the .ProseMirror element we'd want to attach a menu to doesn't exist when we need to create the factory for it. Could just attach to a parent instead, not sure what the best solution is atm.
  • In React, the editor is rendered from #root, which means that for any children, we can't really attach another root to render the menus. We would have to pass the menus down to BlockNoteView and have that sort out the rendering. This would require quite a lot of changes because showing/updating/hiding the menus is currently the responsibility of the corresponding PM plugins, but now BlockNoteView would be responsible for it.

@matthewlipski matthewlipski added the prio:high High priority label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants