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

Rich text: a clear split between the core and the implementation for block context #31693

Closed
ellatrix opened this issue May 11, 2021 · 0 comments
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Package] Rich text /packages/rich-text

Comments

@ellatrix
Copy link
Member

This refactoring is internally to rich text and not affecting public APIs.

We’d like to use core rich text without implementation specific things outside block context at some point.

I already started this separation when I created the rich-text package, but this separation was not complete as there was still much implementation specific logic left in the core rich text component. For example, undo, split, merge, enter etc. handling is very block context specific. Core rich text still relies on a block client ID, which is of course block specific.

For web, core rich text will become a simple behavioural hook returning a ref callback. I'm not sure how a native core rich text component (or maybe hook returning props and children) could look like, but the core rich text for web and native will look different, which means the implementation of it will look a bit different too.

@ellatrix ellatrix added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Package] Rich text /packages/rich-text labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Package] Rich text /packages/rich-text
Projects
None yet
Development

No branches or pull requests

1 participant