Have any question about developing blocks for Gutenberg or the Block Editor? We’ve answered the most common Gutenberg development questions in the simplest way.
To store a Gutenberg block’s attributes in post meta, you can set its
source attribute to
meta. In addition you need to register the post meta field and make it available via the REST API. WordPress will then read and store the attribute’s value in post meta without you needing to write any further code.
For further information check the Attributes section or the Use Post Meta Data tutorial in the Gutenberg Developer Documentation.
This error message means that the wp.editor variable is not defined. To fix this, you need to add the