Demo Next.js app with Plate.js AI editor.
- Add environment variables:
Create
.env.local:OPENAI_API_KEY=your-openai-api-key-here GOOGLE_GENERATIVE_AI_API_KEY=your-google-ai-api-key-here
- Run with
npm run dev
- Open editor: Go to http://localhost:3000/editor
-
Create Next.js app:
npx create-next-app@latest . --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --yes
-
Initialize shadcn/ui:
npx shadcn@latest init --yes
-
Add Plate.js AI editor:
npx shadcn@latest add https://platejs.org/r/editor-ai
Built with Next.js + Plate.js + shadcn/ui