-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Format API #10068
Comments
I'm in the process of creating a PR with this proposal on top of #7890. |
I like this a lot! It seems slightly strange to call it a format since inline images would also go through this API, but that's very much bikeshedding. At this point, it's just awesome to see this in the works :) |
About the first example: Can you expand a bit more about how it works? I don't see any Can't this be more explicit: similar to the I understand that it might seem better/easier to add small formats with implicitness but I prefer if we start with explicitness and evolve towards some implicit defaults. We need to learn new components here Great proposal anyway. |
@chrisvanpatten I guess I don't really see it the same way. The way I see it is that there are two things: text and formatting. Images are formatting on top of text. Maybe the naming could be better, but I don't really see anything wrong with "format". Ideally we have a name for it that applies to any HTML on top of text. |
@youknowriad Agreed on staying explicit, I'll adjust the example. |
We have just landed Format API with #10068. It allows registering any format you need as described in this issue. We are still working on a way to give better control which control can be displayed for a given block and documentation. It should be all ready early next week. |
This issue is to discuss any formatting API build on top of #7890. The idea is to stick close the block registration API so it's a familiar concept.
See #10209 for more concrete information!
Shortcut
is seen a separate form of UI, which can work on it's own (e.g. a code button only has a shortcut).ToolbarControls
fills controls in the toolbar portal.InserterItems
fills controls in the inserter portal.LinkContainer
, and can have its own state.It would remove the current format settings object in
RichText
, remove shortcuts to be registered separately, and remove the inline tokens API.Adding simple formatting button
Adding a link button
Adding an image button
The text was updated successfully, but these errors were encountered: