Add documentation for allowedFormats to rich-text package readme file#42349
Add documentation for allowedFormats to rich-text package readme file#42349Smit2808 wants to merge 1 commit intoWordPress:trunkfrom Smit2808:patch-1
allowedFormats to rich-text package readme file#42349Conversation
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Smit2808! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
fabiankaegy
left a comment
There was a problem hiding this comment.
Hi @Smit2808 👋
Thanks for your contribution :)
The file you added the documentation for the allowedFormats property to actually is for the rich-text package that powers the underlying text handling engine. Not the RichText component that you use to interface with the rich-text strings.
That documentation can be found here: https://github.com/WordPress/gutenberg/tree/trunk/packages/block-editor/src/components/rich-text#allowedformats-array and it does include something about the allowedFormats property.
I do think that the code example you have provided and the description actually is quite useful so I'd encourage you to take a look at the existing documentation and suggest any updates you think would be useful to make it easier to understand :)
allowedFormats to rich-text package readme file
|
Hi @fabiankaegy Thanks for reviewing my PR. Sure I will add PR for the rich-text package. I will add some explanation and this code example, So viewers will get a proper understanding of this property. |
|
Hi @fabiankaegy, I have created this PR: #42426. Review it when you get time. Thank you. |
What?
In this PR I have added the information about the allowedFormats property. In richtext documentation, there is no detailed information about this property. So created the PR for this.
Why?
In rich text documentation, there should be information about the allowedFormats property.
The allowedFormats property provides the formatting options in tools. If you want to display only limited options to richtext then allowedFormats is used.
How?
In my custom Gutenberg block, I want to stop displaying some formating options so I researched a lot and found about this allowedFormats property in one blog. So I think there should be proper documentation about allowedFormats property in rich text documentation. Because this property is related to richtext.
Testing Instructions
Open the rich text documentation and you will not find any info about allowedFormats property.
Screenshots or screencast