Skip to content

Commit

Permalink
[chore] update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ash committed Aug 25, 2024
1 parent 2566c17 commit ceab9c5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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
Expand Down

0 comments on commit ceab9c5

Please sign in to comment.