0.1.0 • Published 2 years ago

@wru/payloadcms-slate-plugin-textcolor-leaf v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

PayloadCMS SlateEditor Leaf - TextColor

Add a simple text color picker - a predefined list - to the SlateJS editor.

Installation

  yarn add @wru/payloadcms-slate-plugin-textcolor-leaf
  # OR
  npm i @wru/payloadcms-slate-plugin-textcolor-leaf

Usage

Add the leav to the slateEditor. For example in payload.config.ts

editor: slateEditor({
    admin: {
        leaves: [
            wruTextColorLeaf({
                name: 'color_picker',
                colorList: [
                    {
                        label: 'Primary',
                        color: '#8BE28C',
                    },
                    {
                        label: 'Secondary',
                        color: '#87021f',
                    },
                ],
            }),
        ],
    },
}),
0.1.0

2 years ago

0.0.11

2 years ago

0.0.8

2 years ago