@wru/payloadcms-slate-plugin-textcolor-leaf
v0.1.0
Published
payloadcms-slate-plugin-textcolor-leaf
Downloads
328
Maintainers
Readme
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',
},
],
}),
],
},
}),