Skip to content

Conversation

@Smit2808
Copy link
Contributor

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

@github-actions
Copy link

👋 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.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jul 12, 2022
@Mamaduka Mamaduka added the [Type] Developer Documentation Documentation for developers label Jul 12, 2022
@Mamaduka Mamaduka requested a review from fabiankaegy July 12, 2022 08:44
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

@fabiankaegy fabiankaegy changed the title Update README.md Add documentation for allowedFormats to rich-text package readme file Jul 12, 2022
@Smit2808
Copy link
Contributor Author

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.

@Smit2808
Copy link
Contributor Author

Hi @fabiankaegy,

I have created this PR: #42426. Review it when you get time.

Thank you.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants