-
Notifications
You must be signed in to change notification settings - Fork 9
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
36 changed files
with
524 additions
and
1,293 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,47 @@ | ||
# Playground Template | ||
|
||
A minimal template for building rich-text editors with [Plate](https://platejs.org/) and Next.js 14. | ||
A minimal template for building rich-text editors with [Plate](https://platejs.org/) and Next.js 15. | ||
|
||
## Usage | ||
## Features | ||
|
||
- Next.js 15 App Directory | ||
- [Plate](https://platejs.org/) editor | ||
- [shadcn/ui](https://ui.shadcn.com/) | ||
|
||
## Installation | ||
|
||
Choose one of these methods: | ||
|
||
### 1. Using CLI (Recommended) | ||
|
||
```bash | ||
npx shadcx@latest init -u https://platejs.org/r | ||
``` | ||
|
||
```bash | ||
npx shadcx@latest add editor-basic -r plate | ||
``` | ||
|
||
### 2. Using Template | ||
|
||
[Use this template](https://github.com/plate-editor/plate-template/generate), then install dependencies: | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
## Development | ||
|
||
```bash | ||
pnpm dev | ||
``` | ||
|
||
## Features | ||
Visit http://localhost:3000/editor to see the editor in action. | ||
|
||
- Next.js 14 App Directory | ||
- [Plate](https://platejs.org/) Editor | ||
- [shadcn/ui](https://ui.shadcn.com/) | ||
- Radix UI Primitives | ||
- Tailwind CSS | ||
- Icons from [Lucide](https://lucide.dev) | ||
- Dark mode with `next-themes` | ||
- Tailwind CSS class sorting, merging and linting. | ||
## Upgrade | ||
|
||
Using the CLI, you can upgrade to `editor-ai` by running: | ||
|
||
```bash | ||
npx shadcx@latest add editor-ai -r plate -o | ||
``` |
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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = { | ||
async redirects() { | ||
return [ | ||
{ | ||
source: '/', | ||
destination: '/editor', | ||
permanent: true, | ||
}, | ||
]; | ||
}, | ||
}; | ||
|
||
export default nextConfig; |
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.