-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3712 from udecode/feat/block
Blocks
- Loading branch information
Showing
84 changed files
with
1,191 additions
and
1,581 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,51 @@ | ||
## Getting Started | ||
# Playground Template | ||
|
||
### Requirements | ||
A Next.js 15 template with [Plate](https://platejs.org/) AI, plugins and components. | ||
|
||
- Node.js | ||
- pnpm | ||
## Features | ||
|
||
### Environment Variables | ||
- Next.js 15 App Directory | ||
- [Plate](https://platejs.org/) editor | ||
- [shadcn/ui](https://ui.shadcn.com/) | ||
|
||
Copy the example env file: | ||
## Installation | ||
|
||
Choose one of these methods: | ||
|
||
### 1. Using CLI (Recommended) | ||
|
||
```bash | ||
cp .env.example .env.local | ||
npx shadcx@latest init -u https://platejs.org/r | ||
``` | ||
|
||
Set up your environment variables: | ||
|
||
- `OPENAI_API_KEY` – OpenAI API key ([get one here](https://platform.openai.com/account/api-keys)) | ||
```bash | ||
npx shadcx@latest add editor-ai -r plate | ||
``` | ||
|
||
### Development | ||
### 2. Using Template | ||
|
||
1. Install dependencies: | ||
[Use this template](https://github.com/plate-editor/plate-template/generate), then install dependencies: | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
2. Start the development server: | ||
## Development | ||
|
||
Copy the example env file: | ||
|
||
```bash | ||
cp .env.example .env.local | ||
``` | ||
|
||
Configure `.env.local`: | ||
|
||
- `OPENAI_API_KEY` – OpenAI API key ([get one here](https://platform.openai.com/account/api-keys)) | ||
|
||
Start the development server: | ||
|
||
```bash | ||
pnpm dev | ||
``` | ||
|
||
Visit http://localhost:3000/editor to see the editor in action. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "default", | ||
"aliases": { | ||
"components": "@/components", | ||
"hooks": "@/hooks", | ||
"lib": "@/lib", | ||
"ui": "@/components/ui", | ||
"utils": "@/lib/utils" | ||
}, | ||
"registries": { | ||
"plate": { | ||
"aliases": { | ||
"ui": "@/components/plate-ui" | ||
}, | ||
"url": "https://platejs.org/r" | ||
} | ||
}, | ||
"rsc": true, | ||
"tsx": true, | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/styles/globals.css", | ||
"baseColor": "slate", | ||
"config": "tailwind.config.ts", | ||
"css": "src/app/globals.css", | ||
"cssVariables": true, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils", | ||
"ui": "@/components/plate-ui", | ||
"lib": "@/lib", | ||
"hooks": "@/hooks" | ||
}, | ||
"url": "https://platejs.org/r" | ||
} | ||
"tsx": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
async redirects() { | ||
return [ | ||
{ | ||
source: '/', | ||
destination: '/editor', | ||
permanent: true, | ||
}, | ||
]; | ||
}, | ||
}; | ||
|
||
export default nextConfig; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.