Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/migration-guide/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ plugins: [

## `@payloadcms/richtext-lexical`

If you have custom features for `@payloadcms/richtext-lexical` you will need to migrate your code to the new API. Read more about the new API in the [documentation](https://payloadcms.com/docs/lexical/building-custom-features).
If you have custom features for `@payloadcms/richtext-lexical` you will need to migrate your code to the new API. Read more about the new API in the [documentation](https://payloadcms.com/docs/rich-text/building-custom-features).

## Upgrade from previous beta

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Lexical Building Custom Features
title: Custom Features
label: Custom Features
order: 40
desc: Building custom lexical features
desc: Building custom features
keywords: lexical, rich text, editor, headless cms, feature, features
---

Expand Down
20 changes: 10 additions & 10 deletions docs/rich-text/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
</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.
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>

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.
The editor is the most important property of the [rich text field](/docs/fields/rich-text).

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:
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.

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
Expand Down
8 changes: 6 additions & 2 deletions docs/rich-text/slate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ desc: The Slate editor has been supported by Payload since beta. It's very power
keywords: slatejs, slate, rich text, editor, headless cms
---

The Slate editor has been supported by Payload since we released our initial beta. It's battle-tested and will continue to be supported into the future.
<Banner type="warning">

If you are migrating a Payload project from 1.x or earlier, you can continue to use the Slate editor as long as you'd like.
The [default Payload editor](/docs/rich-text/overview) is currently based on Lexical. This documentation
is about our old Slate-based editor. You can continue using it because it is still supported, or you can
see the optional [migration guide](/docs/rich-text/migration) to migrate from Slate to Lexical (recommended).

</Banner>

To use the Slate editor, first you need to install it:

Expand Down