Adds typography controls to the Payload Lexical rich text editor as individual features added to the editor config. Editors can pick predefined presets or enter custom values for each property. Converters for JSX and HTML output are imported from a separate converters submodule to render the styled text on the frontend.
PayloadCMS lexical-editor typography extension plugin
Installation
npm i payload-lexical-typography109
Stars
12
Forks
1
Open Issues
1 years ago
Last Updated
1.4k
Weekly Downloads
v0.5.2
npm Version
457.8 KB
Unpacked Size
4
Dependencies
109+2 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 109 |
| Dec 4, 2026 | 109 |
| Dec 3, 2026 | 109 |
| Dec 2, 2026 | 109 |
| Dec 1, 2026 | 109 |
| Nov 30, 2026 | 109 |
| Nov 29, 2026 | 109 |
| Nov 28, 2026 | 109 |
| Nov 27, 2026 | 109 |
| Nov 26, 2026 | 109 |
| Nov 25, 2026 | 109 |
| Nov 24, 2026 | 109 |
| Nov 23, 2026 | 109 |
| Nov 22, 2026 | 109 |
| Nov 21, 2026 | 109 |
| Nov 20, 2026 | 109 |
| Nov 19, 2026 | 109 |
| Nov 18, 2026 | 109 |
| Nov 17, 2026 | 109 |
| Nov 16, 2026 | 109 |
| Nov 15, 2026 | 109 |
| Nov 14, 2026 | 109 |
| Nov 13, 2026 | 109 |
| Nov 12, 2026 | 109 |
| Nov 11, 2026 | 109 |
| Nov 10, 2026 | 109 |
| Nov 9, 2026 | 108 |
| Nov 8, 2026 | 108 |
| Nov 7, 2026 | 108 |
| Nov 6, 2026 | 108 |
| Nov 5, 2026 | 108 |
| Nov 4, 2026 | 108 |
| Nov 3, 2026 | 109 |
| Nov 2, 2026 | 109 |
| Nov 1, 2026 | 109 |
| Oct 31, 2026 | 109 |
| Oct 30, 2026 | 109 |
| Oct 29, 2026 | 109 |
| Oct 28, 2026 | 109 |
| Oct 27, 2026 | 109 |
| Oct 26, 2026 | 109 |
| Oct 25, 2026 | 109 |
| Oct 24, 2026 | 109 |
| Oct 23, 2026 | 109 |
| Oct 22, 2026 | 109 |
| Oct 21, 2026 | 108 |
| Oct 20, 2026 | 108 |
| Oct 19, 2026 | 108 |
| Oct 18, 2026 | 108 |
| Oct 17, 2026 | 108 |
| Oct 16, 2026 | 108 |
| Oct 15, 2026 | 108 |
| Oct 14, 2026 | 108 |
| Oct 13, 2026 | 108 |
| Oct 12, 2026 | 108 |
| Oct 11, 2026 | 108 |
| Oct 10, 2026 | 108 |
| Oct 9, 2026 | 108 |
| Oct 8, 2026 | 108 |
| Oct 7, 2026 | 108 |
| Oct 6, 2026 | 108 |
| Oct 5, 2026 | 108 |
| Oct 4, 2026 | 108 |
| Oct 3, 2026 | 108 |
| Oct 2, 2026 | 108 |
| Oct 1, 2026 | 108 |
| Sep 30, 2026 | 108 |
| Sep 29, 2026 | 108 |
| Sep 28, 2026 | 108 |
| Sep 27, 2026 | 108 |
| Sep 26, 2026 | 108 |
| Sep 25, 2026 | 108 |
| Sep 24, 2026 | 108 |
| Sep 23, 2026 | 108 |
| Sep 22, 2026 | 108 |
| Sep 21, 2026 | 108 |
| Sep 20, 2026 | 108 |
| Sep 19, 2026 | 108 |
| Sep 18, 2026 | 108 |
| Sep 17, 2026 | 108 |
| Sep 16, 2026 | 108 |
| Sep 15, 2026 | 108 |
| Sep 14, 2026 | 108 |
| Sep 13, 2026 | 108 |
| Sep 12, 2026 | 108 |
| Sep 11, 2026 | 108 |
| Sep 10, 2026 | 108 |
| Sep 9, 2026 | 107 |
| Sep 8, 2026 | 107 |
| Sep 7, 2026 | 107 |
| Sep 6, 2026 | 107 |
1.3K−150 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 1,274 |
| Dec 4, 2026 | 1,367 |
| Dec 3, 2026 | 1,351 |
| Dec 2, 2026 | 1,425 |
| Dec 1, 2026 | 1,446 |
| Nov 30, 2026 | 1,453 |
| Nov 29, 2026 | 1,546 |
| Nov 28, 2026 | 1,655 |
| Nov 27, 2026 | 1,750 |
| Nov 26, 2026 | 1,857 |
| Nov 25, 2026 | 1,803 |
| Nov 24, 2026 | 1,870 |
| Nov 23, 2026 | 1,863 |
| Nov 22, 2026 | 1,852 |
| Nov 21, 2026 | 1,817 |
| Nov 20, 2026 | 1,834 |
| Nov 19, 2026 | 1,808 |
| Nov 18, 2026 | 1,848 |
| Nov 17, 2026 | 1,803 |
| Nov 16, 2026 | 1,894 |
| Nov 15, 2026 | 1,792 |
| Nov 14, 2026 | 1,729 |
| Nov 13, 2026 | 1,638 |
| Nov 12, 2026 | 1,574 |
| Nov 11, 2026 | 1,442 |
| Nov 10, 2026 | 1,379 |
| Nov 9, 2026 | 1,313 |
| Nov 8, 2026 | 1,348 |
| Nov 7, 2026 | 1,422 |
| Nov 6, 2026 | 1,522 |
| Nov 5, 2026 | 1,627 |
| Nov 4, 2026 | 1,659 |
| Nov 3, 2026 | 1,655 |
| Nov 2, 2026 | 1,636 |
| Nov 1, 2026 | 1,697 |
| Oct 31, 2026 | 1,842 |
| Oct 30, 2026 | 1,881 |
| Oct 29, 2026 | 1,528 |
| Oct 28, 2026 | 1,289 |
| Oct 27, 2026 | 1,630 |
| Oct 26, 2026 | 1,652 |
| Oct 25, 2026 | 1,652 |
| Oct 24, 2026 | 1,566 |
| Oct 23, 2026 | 1,139 |
| Oct 22, 2026 | 1,761 |
| Oct 21, 2026 | 2,109 |
| Oct 20, 2026 | 1,897 |
| Oct 19, 2026 | 1,981 |
| Oct 18, 2026 | 1,966 |
| Oct 17, 2026 | 2,014 |
| Oct 16, 2026 | 2,529 |
| Oct 15, 2026 | 2,256 |
| Oct 14, 2026 | 2,147 |
| Oct 13, 2026 | 2,049 |
| Oct 12, 2026 | 2,010 |
| Oct 11, 2026 | 1,856 |
| Oct 10, 2026 | 1,771 |
| Oct 9, 2026 | 1,600 |
| Oct 8, 2026 | 1,499 |
| Oct 7, 2026 | 1,477 |
| Oct 6, 2026 | 1,498 |
| Oct 5, 2026 | 1,599 |
| Oct 4, 2026 | 1,677 |
| Oct 3, 2026 | 1,664 |
| Oct 2, 2026 | 1,562 |
| Oct 1, 2026 | 1,503 |
| Sep 30, 2026 | 1,532 |
| Sep 29, 2026 | 1,529 |
| Sep 28, 2026 | 1,486 |
| Sep 27, 2026 | 1,474 |
| Sep 26, 2026 | 1,390 |
| Sep 25, 2026 | 1,407 |
| Sep 24, 2026 | 1,526 |
| Sep 23, 2026 | 1,500 |
| Sep 22, 2026 | 1,636 |
| Sep 21, 2026 | 1,544 |
| Sep 20, 2026 | 1,655 |
| Sep 19, 2026 | 1,767 |
| Sep 18, 2026 | 1,890 |
| Sep 17, 2026 | 1,923 |
| Sep 16, 2026 | 1,967 |
| Sep 15, 2026 | 1,848 |
| Sep 14, 2026 | 1,860 |
| Sep 13, 2026 | 1,727 |
| Sep 12, 2026 | 1,628 |
| Sep 11, 2026 | 1,508 |
| Sep 10, 2026 | 1,470 |
| Sep 9, 2026 | 1,462 |
| Sep 8, 2026 | 1,403 |
| Sep 7, 2026 | 1,354 |
| Sep 6, 2026 | 1,424 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/938188280-root)<a href="https://payloaddirectory.dev/plugins/938188280-root"><img src="https://payloaddirectory.dev/badge/938188280-root.svg" alt="Payload Directory"></a>README
This plugin extends the default Payload Lexical editor functionality by adding more customization options for text elements.
To get plugin up and running, follow these steps:
Install package from NPM:
pnpm add payload-lexical-typography
# OR
npm install payload-lexical-typography
Add features you want to include in your lexical editor config, you can also pass additional props:
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import {
TextColorFeature,
TextSizeFeature,
TextLetterSpacingFeature,
TextLineHeightFeature,
TextFontFamilyFeature,
} from "payload-lexical-typography";
lexicalEditor({
features: () => {
return [
TextColorFeature({
colors: ["#FFFFFF", "#000000", "#FF0000", "#00FF00", "#0000FF"],
}),
TextSizeFeature(),
TextLetterSpacingFeature(),
TextLineHeightFeature(),
TextFontFamilyFeature(),
];
},
});
Add converters to your RichText component
⚠️ Warning: Starting from version 0.1.0, converters must be imported from the /converters submodule instead of /client.
import { TypographyJSXConverters } from "payload-lexical-typography/converters";
const jsxConverters: JSXConvertersFunction<NodeTypes> = ({ defaultConverters }) => ({
...defaultConverters,
...TypographyJSXConverters,
});
For HTML converter, use TypographyHTMLConverters instead of TypographyJSXConverters, from /converters submodule.
| Option | Type | Default | Description |
|---|---|---|---|
colors |
Array<string> | Array<{value: string, label: string}> |
[] |
Defines the color palette available in the color picker's predefined section. Each color should be a valid CSS color value (hex, RGB, etc.). If you pass values with label, it will automatically switch to list view instead. |
colorPicker |
boolean |
true |
By setting this to false, you can hide the color picker, limiting users to selecting only from the predefined colors. |
listView |
boolean |
undefined |
Allows you to manually switch from list to grid view and vice versa. It has higher priority than colors array type. |
| Option | Type | Default | Description |
|---|---|---|---|
sizes |
Array<{value: string, label: string}> |
[] |
Specifies the font size presets available in the size picker. Each size needs both a display label and CSS value. |
method |
"replace" | "combine" |
"replace" |
Determines whether custom sizes replace the defaults ("replace") or are added to them ("combine"). |
scroll |
boolean |
true |
If true, sizes over the first 4 will be accessible via scrolling within a fixed container height. If false, the picker will expand vertically to accommodate all size options. |
customSize |
boolean |
true |
By setting this to false, you hide the custom size input field, limiting users to selecting only from the predefined size options. |
| Option | Type | Default | Description |
|---|---|---|---|
spacings |
Array<{value: string, label: string}> |
[] |
Specifies the letter spacing presets available in the letter spacing picker. Each spacing needs both a display label and CSS value. |
method |
"replace" | "combine" |
"replace" |
Determines whether custom spacings replace the defaults ("replace") or are added to them ("combine"). |
scroll |
boolean |
true |
If true, spacings over the first 4 will be accessible via scrolling within a fixed container height. If false, the picker will expand vertically to accommodate all spacing options. |
customSpacing |
boolean |
true |
By setting this to false, you hide the custom letter spacing input field, limiting users to selecting only from the predefined spacing options. |
| Option | Type | Default | Description |
|---|---|---|---|
lineHeights |
Array<{value: string, label: string}> |
[] |
Specifies the line height presets available in the line height picker. Each line height needs both a display label and CSS value. |
method |
"replace" | "combine" |
"replace" |
Determines whether custom sizes replace the defaults ("replace") or are added to them ("combine"). |
scroll |
boolean |
true |
If true, line heights over the first 4 will be accessible via scrolling within a fixed container height. If false, the picker will expand vertically to accommodate all line height options. |
customLineHeight |
boolean |
true |
By setting this to false, you hide the custom line height input field, limiting users to selecting only from the predefined line height options. |
⚠️ Warning: If the fonts aren't default system fonts, you still need to import them to your project layout, if you want to see them in the editor you have to add proper @font-face rules in your custom.scss file too.
| Option | Type | Default | Description |
|---|---|---|---|
fontFamilies |
Array<{value: string, label: string}> |
[] |
Specifies the font family presets available in the font family picker. Each font family needs both a display label and CSS value. |
method |
"replace" | "combine" |
"replace" |
Determines whether custom font families replace the defaults ("replace") or are added to them ("combine"). |
scroll |
boolean |
true |
If true, font families over the first 4 will be accessible via scrolling within a fixed container height. If false, the picker will expand vertically to accommodate all font family options. |
customFontFamily |
boolean |
true |
By setting this to false, you hide the custom font family input field, limiting users to selecting only from the predefined font family options. |
| Option | Type | Default | Description |
|---|---|---|---|
hideAttribution |
boolean |
false |
Controls visibility of attribution. If using in commercial products or for profit, consider supporting the author or keeping the attribution. |
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any ideas on how this plugin can be improved, please feel free to open an issue or a pull request.
If you have any questions, feel free to reach out to me at [email protected], or on my Linkedin profile Adrian Maj.
If you find this plugin useful, you can support the project by giving it a ⭐️, or buying me a coffee ☕️, for motivation to keep working on it. Thanks for your support!
richtext
Rich-text child block, default Lexical editor preset and JSX renderer for Atomic Payload
6433/wk37v3
payloadcms lexical ext
Lexical editor features for text color, highlight, block background and YouTube or Vimeo embeds
471.4k/wk73v?
payload shiki code
Server-rendered Shiki syntax-highlighted code block for Payload Lexical richtext fields
372.2k/wk3v3
fullscreen editor
Fullscreen mode for the Lexical rich text editor in the Payload admin
88347/wk115v4
payload editor
Declarative presets and typed feature toggles for configuring the Payload Lexical rich-text editor
7225/wk3v3
payload paste as markdown
Lexical editor feature for pasting raw Markdown through a toolbar button, slash command, or drawer
631.2k/wk0v3