@wru/payloadcms-slate-plugin-textcolor-leaf
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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',
                    },
                ],
            }),
        ],
    },
}),

Package Sidebar

Install

npm i @wru/payloadcms-slate-plugin-textcolor-leaf

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

14.8 kB

Total Files

10

Last publish

Collaborators

  • chillerperser