payloadcms / payload

The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
https://payloadcms.com
MIT License
20.99k stars 1.26k forks source link

feat(richtext-lexical): improve lexical types, improve docs #6928

Closed AlessioGr closed 3 days ago

AlessioGr commented 3 days ago

This exports every single node type from @payloadcms/richtext-lexical. Additionally, we now export TypedEditorState which provides truly strong types for the editor state.

It works just like SerializedEditorState exported from lexical core, with the difference that our TypedEditorState type also provides correct, nested types for children up to 4 levels deep.