-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
feat: React re-architecture #270
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added number of comments. Will also create a separate PR with some fixes / changes.
About the overall architecture, I have following questions:
- does it make sense that "static" things like "freezeMenu" are part of "state"? (sorry for opening up this discussion again, seems we're going a bit back and forth)
- Plugin views are recreated indeed when other plugins are changed / added. This is by design in prosemirror, probably so that plugins can react to changes to the view that other plugins make. Although it works (see my separate PR that fixes the issues you ran into with this), I think it will be nicer (and faster) to register all plugins on editor instantation
After the comments have been addressed, lets discussed this including your bullets above that haven't been addressed yet
packages/core/src/extensions/DraggableBlocks/DraggableBlocksPlugin.ts
Outdated
Show resolved
Hide resolved
packages/core/src/shared/plugins/suggestion/SuggestionPlugin.ts
Outdated
Show resolved
Hide resolved
packages/react/src/FormattingToolbar/components/FormattingToolbar.tsx
Outdated
Show resolved
Hide resolved
packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts
Show resolved
Hide resolved
* fix initialcontent and uniqueid * fix * Removed ready check in `BlockNoteView` --------- Co-authored-by: Matthew Lipski <matthewlipski@gmail.com>
There are a number of issues with the current rendering implementation in React:
useBlocknote
, causing issues.document.body
instead of being a sibling to the editor.uiFactories
option, which is kind of clunky.This PR is a major rethink of how we create, render, and pass elements to the editor in React (also changes the vanilla implementation a bit).