Skip to content

Documentation: More examples of save() callback of block #4070

@Shelob9

Description

@Shelob9

After spending some time teaching myself Gutenberg, I found the information on the save() callback for blocks and how serializing data to comments works
https://wordpress.org/gutenberg/handbook/block-edit-save/

  • More examples of save() function, showing how you would use it for
    • Serializing attributes to main comment
    • Storing attributes in child elements
    • Saving content to be rendered in the front-end using same React component as used to render preview in edit callback.

In regards to serialization of data, it would be helpful if it was explained how automatic serialization of attributes work. A link to the section on attributes is also needed.

Metadata

Metadata

Assignees

Labels

Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Feature] ExtensibilityThe ability to extend blocks or the editing experience[Type] Developer DocumentationDocumentation for developers

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions