How to access "default" property of attribute in Gutenberg
In a Gutenberg block I try to read the value of an attribute's default property, so that I can find out in the transformation routine (to another block type) if any give attribute still has the default value.
With this.props.attributes
I only see the values of attributes, but I need their "meta data".
One sample declaration in registerBlockType would look like:
attributes: {
amount: {
type: 'integer',
default: 1
},
// ...
}
Topic block-editor Wordpress
Category Web