-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add attribute types to docs #16128
Comments
I agree it should be documented more explicitly. To answer, the types support is meant to align with JSON Schema types, similar to that of the schemas used in registering REST routes server-side. https://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1 |
Thanks - that helps. |
I can work on getting this info stated explicitly on the documentation, if still needed! |
@AdamDTak2112 That would be awesome! |
@chrisvanpatten Perfect. Should I include the Schema page that @aduth posted above listing the various types, or are a brief list enough for the developer to understand? |
@AdamDTak2112 I think a brief list would be a good starting point, and also maybe link out to the Schema docs for the WP REST API: https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/ |
When registering a block you can define the attributes and their types, but I can't find any docs detailing what the allowed types are.
https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-attributes.md
I can guess what some of them are, but what about boolean? Is it boolean or bool? And number/ int/ float/ all of the above?
I think a proper list would be very helpful.
Thanks
The text was updated successfully, but these errors were encountered: