-
-
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
Generic node factory #3459
Generic node factory #3459
Conversation
🦋 Changeset detectedLatest commit: 5833cde The changes in this PR will be included in the next version bump. This PR includes changesets to release 57 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 ↗︎
|
That is a non breaking change which will allow me to create nodes without the need of declaring every attribute as optional. export interface MyCustomTElement extends TElement {
id: string;
type: "my-custom-element";
language: Language;
children: TText[];
....
something: Else;
}
....
export type EditorValue = (MyCustomTElement | MyOtherCustomTElement)[]; The name of the option, |
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.
Since it's a core plugin, and you can override editor.blockFactory
in your own plugin, I don't think there is much added-value to do this, especially with the incoming Plate 37 (there is so much changes I can't resume it here)
That's what i do, i override almost all core plugins. Will stick to that approach then. Thank you. |
Checklist
yarn typecheck
yarn lint:fix
yarn test
yarn brl
yarn changeset