For a block I want the user to be able to set a couple of defaults for each newly generated block, think e.g colors and other attributes. Then every time a new block is created on the website, the defaults should be loaded. Each block can then be customized from the sidebar if needed (<InspectorControls>)
. For example the user sets text color to red, but then occasionally can choose another color.
So far I created a custom settings page for the WordPress plugin and then I load these defaults into the block when it gets registered. Feels like a hack, but works.
The new block themes now have a Site Editor and somewhere in there it is also possible to set the default styles of a block widget.
How can I access this menu and add items similar to the Sidebar of each specific block? Would be great to be able to replicate all the <InspectorControls>
of the Sidebar as Defaults. How can I achieve this?