-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Use block factory to create elements in exit break #3457
Conversation
🦋 Changeset detectedLatest commit: 68a8abf The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@zbeyens There are many more instances where the same patch could be applied. Do you want me to create separate PR for each package or fix them all in one PR? |
You can do it here |
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.
It looks like there is overlap between editor.blockFactory
and editor.insertNodes
. One could instead override the latter. I think editor.blockFactory
should be used as the default block (e.g. paragraph) insertion, not for other types. I'm planning to rename it to insertDefaultBlock
. What do you think?
I do not use any of the default element plugins, but if i had to, i would never try to extend its TElement with additional props, instead i would create my own plugin that works with my own types. Thats not the case with non-element plugins like exitBreak, normalizeTypes, trailingBlock or nodeFactory. Ideally those would work with any type through the blockFactory as its not that easy to embed a custom version of those into an app (except for nodeFactory which i already did) I will remove the references to blockFactory from places that do not create default elements in my next commit. |
Head branch was pushed to by a user without write access
@zbeyens I need help with the failed tests. I belive what i did to fix the test was not the correct way to fix them. |
Checklist
yarn typecheck
yarn lint:fix
yarn test
yarn brl
yarn changeset