
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
payloadcms-lexical-ext
Advanced tools
Ideal for content creators and developers who want to enrich their text content with more visual appeal.
This plugin adds new features to the Payload CMS lexical editor. You can use any of the features on its own or all of them togehter:
New features will be added - Create issues for new features or create them yourself and create a PR to share it with the community




npm install payloadcms-lexical-ext
or
yarn add payloadcms-lexical-ext
import { BgColorFeature, HighlightColorFeature, TextColorFeature, YoutubeFeature, VimeoFeature } from 'payloadcms-lexical-ext';
import 'payloadcms-lexical-ext/client/client.css'
lexicalEditor({
features: [
...defaultEditorFeatures,
...YourFeatures...
TextColorFeature(),
HighlightColorFeature(),
BgColorFeature(),
YoutubeFeature(),
VimeoFeature()
]
});
Add JSX or HTML converters
4.1 JSX Converters
components/RichText/index.tsx
import { JSXConverters } from 'payloadcms-lexical-ext'
const jsxConverters: JSXConvertersFunction<NodeTypes> = ({ defaultConverters }) => ({
...defaultConverters,
...JSXConverters
})
4.2 HTML Converters
import { consolidateHTMLConverters, convertLexicalToHTML, sanitizeServerEditorConfig } from '@payloadcms/richtext-lexical'
import { HTMLConverters } from 'payloadcms-lexical-ext'
...
const sanitizedEditorConfig = await sanitizeServerEditorConfig(editorConfig, req.payload.config)
await convertLexicalToHTML({
converters: [
...HTMLConverters,
...consolidateHTMLConverters({ editorConfig: sanitizedEditorConfig })
],
data: jsonEditorContent,
req,
})
The plugin comes with several customizable options:
TextColorFeature({
colors: [{
type: 'button',
label: 'Custom color',
color: '#1155aa'
}]
});
Contributions are welcome! To get started:
This project is licensed under the MIT License.
For questions or suggestions, feel free to open an issue or reach out to the Payload CMS community.
FAQs
Extended lexical editor features for Payload CMS
The npm package payloadcms-lexical-ext receives a total of 921 weekly downloads. As such, payloadcms-lexical-ext popularity was classified as not popular.
We found that payloadcms-lexical-ext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.