we-are-you

payloadcms slate plugin textcolor leaf

by we-are-you
Rich text & editors
v2
^2.0.0

Overview

Summary generated from the README

Adds a text color leaf to the Payload Slate editor. You register it in the slateEditor admin leaves list and supply a named list of colors with labels and hex values. Editors then apply one of those predefined colors to selected text. It targets Payload 2.x.

Features

  • Text color leaf for the Slate editor
  • Predefined color list with label and hex value
  • Configurable leaf name
  • Registered through the slateEditor admin leaves option

Use cases

  • Restrict editors to brand colors when coloring text in rich text fields
  • Highlight words in Slate content using a fixed palette

From the author

payloadcms-slate-plugin-textcolor-leaf

Installation

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

5

Stars

0

Forks

1

Open Issues

2 years ago

Last Updated

25

Weekly Downloads

v0.1.0

npm Version

14.5 KB

Unpacked Size

0

Dependencies

GitHub stars

50 since Sep 7

Show data
GitHub stars by day (UTC)
DateStars
Dec 6, 20265
Dec 5, 20265
Dec 4, 20265
Dec 3, 20265
Dec 2, 20265
Dec 1, 20265
Nov 30, 20265
Nov 29, 20265
Nov 28, 20265
Nov 27, 20265
Nov 26, 20265
Nov 25, 20265
Nov 24, 20265
Nov 23, 20265
Nov 22, 20265
Nov 21, 20265
Nov 20, 20265
Nov 19, 20265
Nov 18, 20265
Nov 17, 20265
Nov 16, 20265
Nov 15, 20265
Nov 14, 20265
Nov 13, 20265
Nov 12, 20265
Nov 11, 20265
Nov 10, 20265
Nov 9, 20265
Nov 8, 20265
Nov 7, 20265
Nov 6, 20265
Nov 5, 20265
Nov 4, 20265
Nov 3, 20265
Nov 2, 20265
Nov 1, 20265
Oct 31, 20265
Oct 30, 20265
Oct 29, 20265
Oct 28, 20265
Oct 27, 20265
Oct 26, 20265
Oct 25, 20265
Oct 24, 20265
Oct 23, 20265
Oct 22, 20265
Oct 21, 20265
Oct 20, 20265
Oct 19, 20265
Oct 18, 20265
Oct 17, 20265
Oct 16, 20265
Oct 15, 20265
Oct 14, 20265
Oct 13, 20265
Oct 12, 20265
Oct 11, 20265
Oct 10, 20265
Oct 9, 20265
Oct 8, 20265
Oct 7, 20265
Oct 6, 20265
Oct 5, 20265
Oct 4, 20265
Oct 3, 20265
Oct 2, 20265
Oct 1, 20265
Sep 30, 20265
Sep 29, 20265
Sep 28, 20265
Sep 27, 20265
Sep 26, 20265
Sep 25, 20265
Sep 24, 20265
Sep 23, 20265
Sep 22, 20265
Sep 21, 20265
Sep 20, 20265
Sep 19, 20265
Sep 18, 20265
Sep 17, 20265
Sep 16, 20265
Sep 15, 20265
Sep 14, 20265
Sep 13, 20265
Sep 12, 20265
Sep 11, 20265
Sep 10, 20265
Sep 9, 20265
Sep 8, 20265
Sep 7, 20265
npm weekly downloads

26+12 since Sep 7

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 202626
Dec 5, 202612
Dec 4, 202613
Dec 3, 202611
Dec 2, 20267
Dec 1, 202611
Nov 30, 202611
Nov 29, 202613
Nov 28, 202616
Nov 27, 202615
Nov 26, 202613
Nov 25, 202617
Nov 24, 202613
Nov 23, 202613
Nov 22, 202613
Nov 21, 202614
Nov 20, 202613
Nov 19, 202614
Nov 18, 202614
Nov 17, 202614
Nov 16, 202616
Nov 15, 202613
Nov 14, 202610
Nov 13, 202611
Nov 12, 202612
Nov 11, 20269
Nov 10, 202613
Nov 9, 202612
Nov 8, 202622
Nov 7, 202620
Nov 6, 202618
Nov 5, 202616
Nov 4, 202615
Nov 3, 202611
Nov 2, 202614
Nov 1, 20265
Oct 31, 20267
Oct 30, 20267
Oct 29, 20267
Oct 28, 20267
Oct 27, 20268
Oct 26, 20266
Oct 25, 20267
Oct 24, 20268
Oct 23, 20268
Oct 22, 202610
Oct 21, 202610
Oct 20, 202610
Oct 19, 20268
Oct 18, 20267
Oct 17, 20267
Oct 16, 20267
Oct 15, 20269
Oct 14, 202611
Oct 13, 202610
Oct 12, 202610
Oct 11, 202610
Oct 10, 20268
Oct 9, 20268
Oct 8, 20264
Oct 7, 20262
Oct 6, 20263
Oct 5, 20263
Oct 4, 20262
Oct 3, 20263
Oct 2, 20267
Oct 1, 20268
Sep 30, 20269
Sep 29, 20268
Sep 28, 20268
Sep 27, 20269
Sep 26, 202611
Sep 25, 202610
Sep 24, 202611
Sep 23, 202612
Sep 22, 202613
Sep 21, 202619
Sep 20, 202625
Sep 19, 202623
Sep 18, 202622
Sep 17, 202622
Sep 16, 202622
Sep 15, 202622
Sep 14, 202617
Sep 13, 202614
Sep 12, 202616
Sep 11, 202617
Sep 10, 202615
Sep 9, 202613
Sep 8, 202613
Sep 7, 202614

Each point is npm's rolling 7-day download count.

Health Score

25/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/750330058-root.svg)](https://payloaddirectory.dev/plugins/750330058-root)
HTML
<a href="https://payloaddirectory.dev/plugins/750330058-root"><img src="https://payloaddirectory.dev/badge/750330058-root.svg" alt="Payload Directory"></a>
Updated Feb 10, 2024Created Jan 30, 2024Published Feb 10, 2024

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

Similar plugins