How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
How can I add template colors (i.e., those black and pastel shades) to ColorPalette (“Input border color”)? In Gutenberg, you can get the block color palette in two ways: Use getSettings() in the block editor’s data (core/block-editor). E.g. import { select } from ‘@wordpress/data’; const colorPalette = select( ‘core/block-editor’ ).getSettings().colors; // PS: You can also … Read more