editor-color-palette instead of Iris Color Picker

Support MB Blocks editor-color-palette instead of Iris Color PickerResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16838
    bodenburgcbodenburgc
    Participant

    Is it possible to use "editor-color-palette" instead of the iris color picker?

    Then define the palette:

    
    add_theme_support( 'disable-custom-colors' );
    add_theme_support( 'editor-color-palette', array(
        array(
            'name'  => __( 'Light gray', 'genesis-sample' ),
            'slug'  => 'light-gray',
            'color'   => '#f5f5f5',
        ),
        array(
            'name'  => __( 'Medium gray', 'genesis-sample' ),
            'slug'  => 'medium-gray',
            'color' => '#999',
        ),
        array(
            'name'  => __( 'Dark gray', 'genesis-sample' ),
            'slug'  => 'dark-gray',
            'color' => '#333',
           ),
    ) );
    #16844
    Anh TranAnh Tran
    Keymaster

    Unfortunately, the plugin supports only Iris color picker. However, you can define your own palettes, as shown here:

    https://github.com/wpmetabox/library/blob/master/general/demo.php#L248

    Docs for that: https://automattic.github.io/Iris/

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