-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(richtext-lexical): adds docs page for lexical blocks, adds new lexical block component types and styles #14971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
| @extend %body; | ||
| @include shadow-sm; | ||
| display: inline-block; | ||
| margin-right: base(0.2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to move those styles down to the container. Otherwise, you cannot override them when passing a custom block component, as that only replaces the container.
| /** | ||
| * Props for the client components provided to `admin.components.Block` of lexical blocks. | ||
| */ | ||
| export type LexicalBlockClientProps = UIFieldClientProps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment those components do not receive any special props, since they are rendered like UI fields.
Nonetheless we should provide prop types for each component, to not leave the user guessing.
Preview: https://payloadcms.com/docs/dynamic/rich-text/blocks?branch=docs/lexical-blocks
This PR creates a new documentation page for lexical blocks, with lots of images and examples showing how to use the blocks feature and customize it.