Skip to content

Bug (lexical): TextColorFeature missing from exports and EditorConfig types in v3.73.0 #15432

@ysouane

Description

@ysouane

Describe the Bug

On version 3.73.0, I am unable to implement text color customization within the Lexical editor.

  1. The TextColorFeature (and TextStateFeature) is not exported by @payloadcms/richtext-lexical, leading to a "Module has no exported member" error.

  2. Attempting to pass color configurations directly via the lexical property in lexicalEditor results in a TypeScript error: Object literal may only specify known properties, and 'selection' (or 'admin') does not exist in type 'EditorConfig'.

Link to the code that reproduces this issue

https://github.com/ysouane/repro-lexical-colors

Reproduction Steps

Reproduction Steps:

  1. Use Payload version 3.73.0.
  2. Try to import TextColorFeature from @payloadcms/richtext-lexical.
  3. Try to configure a custom color palette in a richText field using the lexicalEditor function.

Expected Behavior:

There should be a documented and type-safe way to enable the Color Picker in the Lexical toolbar for users to highlight specific words/sentences with custom brand colors.
Environment Details:

Which area(s) are affected?

plugin: richtext-lexical

Environment Info

* Payload Version: 3.73.0
* Next.js Version: 15.4.10
* Editor: Lexical
* Package Manager: pnpm

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions