docs: improvements in rich text section (#9954)
- fixed broken links - improved introduction of `overview` and `slate` sections
This commit is contained in:
@@ -7,21 +7,21 @@ title: Rich Text Editor
|
||||
---
|
||||
|
||||
<Banner type="success">
|
||||
The Payload editor is based on Lexical, Meta's rich text editor. The previous default editor was based on Slate and is still supported. You can read [its documentation](../rich-text/slate), or the optional [migration guide](../rich-text/migration) to migrate from Slate to Lexical (recommended).
|
||||
|
||||
This documentation is about our new editor, based on Lexical (Meta's rich text editor). The previous default
|
||||
editor was based on Slate and is still supported. You can read [its documentation](/docs/rich-text/slate),
|
||||
or the optional [migration guide](/docs/rich-text/migration) to migrate from Slate to Lexical (recommended).
|
||||
|
||||
</Banner>
|
||||
|
||||
One of Payload's goals is to build the best rich text editor experience that we possibly can. We want to combine the beauty and polish of the Medium editing experience with the strength and features of the Notion editor - all in one place.
|
||||
The editor is the most important property of the [rich text field](/docs/fields/rich-text).
|
||||
|
||||
Classically, we've used SlateJS to work toward this goal, but building custom elements into Slate has proven to be more difficult than we'd like, and we've been keeping our options open.
|
||||
As a key part of Payload, we are proud to offer you the best editing experience you can imagine. With healthy
|
||||
defaults out of the box, but also with the flexibility to customize every detail: from the “/” menu
|
||||
and toolbars (whether inline or fixed) to inserting any component or subfield you can imagine.
|
||||
|
||||
Lexical is extremely impressive and trivializes a lot of the hard parts of building new elements into a rich text editor. It has a few distinct advantages over Slate, including the following:
|
||||
|
||||
1. A "/" menu, which allows editors to easily add new elements while never leaving their keyboard
|
||||
2. A "hover" toolbar that pops up if you select text
|
||||
3. It supports Payload blocks natively, directly within your rich text editor
|
||||
4. Custom elements, called "features", are much easier to build in Lexical vs. Slate
|
||||
|
||||
To use the Lexical editor, first you need to install it:
|
||||
To use the rich text editor, first you need to install it:
|
||||
|
||||
```bash
|
||||
pnpm install @payloadcms/richtext-lexical
|
||||
|
||||
Reference in New Issue
Block a user