diff --git a/docs/rich-text/lexical.mdx b/docs/rich-text/lexical.mdx index dd1fb86f22..05b5977137 100644 --- a/docs/rich-text/lexical.mdx +++ b/docs/rich-text/lexical.mdx @@ -8,7 +8,7 @@ keywords: lexical, rich text, editor, headless cms 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. -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. +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. Payload's Lexical rich text editor is currently in beta. It's stable enough to use as you build on Payload, so if you're up for helping us fine-tune it, you should use it. But if you're looking for stability, use Slate instead. @@ -27,7 +27,7 @@ To use the Lexical editor, first you need to install it: 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 import { buildConfig } from 'payload/config' @@ -37,7 +37,7 @@ export default buildConfig({ collections: [ // your collections here ], - // Pass the Lexical editor to the root config + // Pass the Lexical editor to the root config editor: lexicalEditor({}) }) ``` @@ -114,4 +114,4 @@ export const Pages: CollectionConfig = { Lots more documentation will be coming soon, which will show in detail how to create your own custom features within Lexical. -For now, take a look at the TypeScript interfaces and let us know if you need a hand. Much more will be coming from the Payload team on this topic soon. \ No newline at end of file +For now, take a look at the TypeScript interfaces and let us know if you need a hand. Much more will be coming from the Payload team on this topic soon. diff --git a/docs/rich-text/overview.mdx b/docs/rich-text/overview.mdx index c06f153341..9f101068c4 100644 --- a/docs/rich-text/overview.mdx +++ b/docs/rich-text/overview.mdx @@ -13,6 +13,6 @@ Payload currently supports two official rich text editors and you can choose eit These editors are built on an "adapter pattern" which means that you will need to install the editor you'd like to use. Take a look at the docs for the editor you'd like to use for instructions on how to install it. -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 newline at end of file +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. diff --git a/docs/rich-text/slate.mdx b/docs/rich-text/slate.mdx index f6f6e9108a..1424143c85 100644 --- a/docs/rich-text/slate.mdx +++ b/docs/rich-text/slate.mdx @@ -27,7 +27,7 @@ export default buildConfig({ collections: [ // your collections here ], - // Pass the Slate editor to the root config + // Pass the Slate editor to the root config editor: slateEditor({}) }) ``` @@ -48,7 +48,7 @@ export const Pages: CollectionConfig = { editor: slateEditor({ admin: { elements: [ - // customize elements allowed in Slate editor here + // customize elements allowed in Slate editor here ], leaves: [ // customize leaves allowed in Slate editor here @@ -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: ```ts -import type { RichTextCustomElement, RichTextCustomLeaf } from 'payload/types' +import type { RichTextCustomElement, RichTextCustomLeaf } from '@payloadcms/richtext-slate' ```