Editor Color Palette

Support MB Blocks Editor Color Palette

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40224
    Sam UnderwoodSam Underwood
    Participant

    Is it possible to improve MB Blocks supports by adding built-in support for the default Gutenberg Editor Color Palette? Adding supports 'color' is something possible in ACF Blocks, but I can't see it is in MB Blocks.

    #40225
    hello@logicdesign.co.uk[email protected]
    Participant

    Hi Sam - I normally stick the colours in an array and return these from a php function, so it can go into both add_theme_support('editor-color-palette', theme_colours()); and also the 'palettes' atrribute for the metabox color field.

    Doing it like this is an ok hack, normally id just use the theme_colours() function to populate a select field though as that gives named colours e.g. 'Primary' => 'is-primary-color' and add the value/class to the html element

    #40234
    PeterPeter
    Moderator

    Hello Sam,

    It is not supported like a standard Gutenberg block. You can use the color palette settings of the color field in the block editor. Please read more here https://docs.metabox.io/fields/color/

    #40235
    Sam UnderwoodSam Underwood
    Participant

    Is it possible to investigate getting this added as a feature of MB Blocks? Using as much native Gutenberg features as possible would be preferable.

    #40241
    PeterPeter
    Moderator

    Hello Sam,

    Thanks for your feedback.

    Only some blocks that can be added text will have the color and background color option to select the palette. The custom block of Meta Box is a mix of all custom fields, so I think supporting the color palette as a native option is not a good way. However, I will inform the development team to explore the possibility.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.