ColorPicker and ColorPalettes
-
I developed a block that consists of two parts:
<figure> <div /> <figcaption /> </figure>
With the help of the block support settings I can, for example, set the alignment, color, border and spacing for the container (figure) or, with some effort, for the DIV within the container. Now I would also like to be able to configure the description (figcaption). This is a RichText element (p) within the figcaption. For this text I would like to be able to set the alignment and color.
I can set the alignment using the AlignmentToolbar. For the color settings I added a new panel in the sidebar in the Styles tab. I found two controls for the color settings:
- ColorPicker: This allows me to select an individual color, but the predefined color-palettes are not displayed for selection… and
- ColorPalette: This is an empty control that doesn’t show me any palettes. With the help of the color prop I can define my own palette, but of course that doesn’t make much sense. I would like to see the existing DEFAULT and THEME palettes displayed here, just like when block support is activated for the Block-Container.
I found countless descriptions of how to define custom palettes, but not how to use the existing standard palettes, which is probably what you always want.
Has anyone got an idea?
- The topic ‘ColorPicker and ColorPalettes’ is closed to new replies.