docs(richtext): fix typos and other issues
This commit is contained in:
@@ -27,7 +27,7 @@ To use the Lexical editor, first you need to install it:
|
|||||||
npm install --save @payloadcms/richtext-lexical
|
npm install --save @payloadcms/richtext-lexical
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have it installed, you can pas it to your top-level Payload config as follows:
|
Once you have it installed, you can pass it to your top-level Payload config as follows:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { buildConfig } from 'payload/config'
|
import { buildConfig } from 'payload/config'
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ These editors are built on an "adapter pattern" which means that you will need t
|
|||||||
|
|
||||||
The big TL;DR here is that Slate is what we have used in the past, and we still support it for existing projects, but if you're building something new and you're feeling adventurous, you should give Lexical a shot. Slate has a lot of good stuff, but Lexical has lots more.
|
The big TL;DR here is that Slate is what we have used in the past, and we still support it for existing projects, but if you're building something new and you're feeling adventurous, you should give Lexical a shot. Slate has a lot of good stuff, but Lexical has lots more.
|
||||||
|
|
||||||
No matter which editor you use, you can install either at the top-level on the `config.editor` property, which will then cascade throughout all of your rich text fields and be used accordingly. But you can also override the editor on a field-by-field basis if you'd like.
|
No matter which editor you use, you have to install it at the top-level on the `config.editor` property, which will then cascade throughout all of your rich text fields and be used accordingly. Additionally, you also have the option to override the editor on a field-by-field basis if you'd like.
|
||||||
|
|||||||
@@ -353,5 +353,5 @@ The plugin itself extends Payload's built-in `shouldBreakOutOnEnter` Slate funct
|
|||||||
If you are building your own custom Rich Text elements or leaves, you may benefit from importing the following types:
|
If you are building your own custom Rich Text elements or leaves, you may benefit from importing the following types:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { RichTextCustomElement, RichTextCustomLeaf } from 'payload/types'
|
import type { RichTextCustomElement, RichTextCustomLeaf } from '@payloadcms/richtext-slate'
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user