Skip to content
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

Documentation: Reference: Attributes code samples should show save callbacks #4071

Closed
Shelob9 opened this issue Dec 18, 2017 · 1 comment
Closed
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Developer Documentation Documentation for developers

Comments

@Shelob9
Copy link
Contributor

Shelob9 commented Dec 18, 2017

The reference page for attributes shows how to register attributes so they are de-serialized from the saved HTML. The examples do not show the corresponding save() callbacks making it harder to understand the concept.
https://wordpress.org/gutenberg/handbook/reference/attributes/

For instance the first example Example: Extract the src attribute from an image found in the block’s markup. shows how to extract from a saved image, but doesn't show how to save an image. That's actually how it's done here: https://wordpress.org/gutenberg/handbook/blocks/introducing-attributes-and-editable-fields/ and that is much better at illustrating the relationship between saving and using attributes.

@ntwb ntwb added the [Type] Developer Documentation Documentation for developers label Dec 19, 2017
@danielbachhuber danielbachhuber added the [Feature] Extensibility The ability to extend blocks or the editing experience label Apr 11, 2018
@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Jun 12, 2018
@gziolo gziolo added this to the Merge Proposal: Documentation milestone Jun 12, 2018
@mtias
Copy link
Member

mtias commented Oct 7, 2018

Combining with #4070.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

No branches or pull requests

5 participants