From ceab9c52cd3e51117662d243af19a3f5faecd43b Mon Sep 17 00:00:00 2001 From: ash Date: Sun, 25 Aug 2024 17:07:21 +0200 Subject: [PATCH] [chore] update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index cb98a66..2a5cf68 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ pnpm add @ai-stack/payloadcms Integrate the AI magic into your Payload config: ```javascript + +// Add below in payload.config.ts import { buildConfig } from 'payload/config'; import { payloadAiPlugin } from '@ai-stack/payloadcms'; @@ -75,6 +77,26 @@ export default buildConfig({ ], // ... your existing Payload configuration }); + + +// Add below in Lexical Editor field config +import { PayloadAiPluginLexicalEditorFeature } from '@ai-stack/payloadcms' + +fields: [ + { + name: 'content', + type: 'richText', + editor: lexicalEditor({ + features: ({ rootFeatures }) => { + return [ + // ... your existing features + PayloadAiPluginLexicalEditorFeature() + ] + }, + }), + }, +] + ``` ## ⚙️ Configuration