Skip to content

Commit 6a39279

Browse files
authored
docs: improvements in rich text section (#9954)
- fixed broken links - improved introduction of `overview` and `slate` sections
1 parent ace7557 commit 6a39279

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

docs/migration-guide/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ plugins: [
11021102

11031103
## `@payloadcms/richtext-lexical`
11041104

1105-
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).
1105+
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).
11061106

11071107
## Upgrade from previous beta
11081108

docs/rich-text/building-custom-features.mdx renamed to docs/rich-text/custom-features.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Lexical Building Custom Features
2+
title: Custom Features
33
label: Custom Features
44
order: 40
5-
desc: Building custom lexical features
5+
desc: Building custom features
66
keywords: lexical, rich text, editor, headless cms, feature, features
77
---
88

docs/rich-text/overview.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ title: Rich Text Editor
77
---
88

99
<Banner type="success">
10-
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).
11-
</Banner>
1210

13-
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.
11+
This documentation is about our new editor, based on Lexical (Meta's rich text editor). The previous default
12+
editor was based on Slate and is still supported. You can read [its documentation](/docs/rich-text/slate),
13+
or the optional [migration guide](/docs/rich-text/migration) to migrate from Slate to Lexical (recommended).
14+
15+
</Banner>
1416

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

17-
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:
19+
As a key part of Payload, we are proud to offer you the best editing experience you can imagine. With healthy
20+
defaults out of the box, but also with the flexibility to customize every detail: from the “/” menu
21+
and toolbars (whether inline or fixed) to inserting any component or subfield you can imagine.
1822

19-
1. A "/" menu, which allows editors to easily add new elements while never leaving their keyboard
20-
2. A "hover" toolbar that pops up if you select text
21-
3. It supports Payload blocks natively, directly within your rich text editor
22-
4. Custom elements, called "features", are much easier to build in Lexical vs. Slate
2323

24-
To use the Lexical editor, first you need to install it:
24+
To use the rich text editor, first you need to install it:
2525

2626
```bash
2727
pnpm install @payloadcms/richtext-lexical

docs/rich-text/slate.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ desc: The Slate editor has been supported by Payload since beta. It's very power
66
keywords: slatejs, slate, rich text, editor, headless cms
77
---
88

9-
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.
9+
<Banner type="warning">
1010

11-
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.
11+
The [default Payload editor](/docs/rich-text/overview) is currently based on Lexical. This documentation
12+
is about our old Slate-based editor. You can continue using it because it is still supported, or you can
13+
see the optional [migration guide](/docs/rich-text/migration) to migrate from Slate to Lexical (recommended).
14+
15+
</Banner>
1216

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

0 commit comments

Comments
 (0)