-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the Bug
On version 3.73.0, I am unable to implement text color customization within the Lexical editor.
-
The TextColorFeature (and TextStateFeature) is not exported by @payloadcms/richtext-lexical, leading to a "Module has no exported member" error.
-
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:
- Use Payload version 3.73.0.
- Try to import TextColorFeature from @payloadcms/richtext-lexical.
- 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