-
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
RichText don't work properly in InspectorControls because BlockEditContextProvider is not providing the right context. #9203
Comments
You need to use the Block Controls component: https://wordpress.org/gutenberg/handbook/blocks/block-controls-toolbars-and-inspector/ |
Does the toolbar show up in the block's toolbar instead? The RichText component was never meant to be used this way (in the Inspector) but I assume you can use |
I'm closing, let me know if it works for you. Thanks. |
@youknowriad No, the toolbar doesn't even show up in the block's toolbar. Also, While you didn't meant to support RichText in the Inspector, but it would be nice to have this functionality. Sometimes we need to create content for a hidden container, such as a modal. For example, there's a button in the block which triggers a modal onClick. We, as a theme developer, should provide a RichText in the Inspector for the user, so it can write his modal's content. |
Ok, So I took a look at this and indeed it's not working and it's more "complex" than I though. The issue is that the |
One possibility is to use the https://github.com/WordPress/gutenberg/tree/master/packages/components/src/slot-fill Last time this was tried, there was some unintended consequences around how events bubble in |
Do we have any updates on this? It looks as closed but I'm not sure if it's supposed to be resolved. I had a case where I wanted to render RichText component on Inspector Controls and the toolbar is not visible. |
I want to display a RichText component in a block's panel. The RichText displays just fine, but there's not any toolbar to add a link to text or make it bold. Could you please take a look at this bug or provide a solution to overcome this issue?
The text was updated successfully, but these errors were encountered: