Closed linonetwo closed 1 month ago
You need to setup components.json. See https://platejs.org/docs/components/cli
Thanks, I see, adding this to the existing config fix it
,
"registries": {
"plate-ui": {
"url": "https://platejs.org/r",
"style": "default",
"aliases": {
"ui": "@/components/plate-ui"
}
}
}
I have to manually modify existing config, because when try to add a new one it said
% pnpm dlx shadcx@latest init
✔ Preflight checks.
✖ Verifying framework.
We could not detect a supported framework at /Users/linonetwo/Desktop/repo/slate-write.
Visit https://ui.shadcn.com/docs/installation/manual to manually configure your project.
Once configured, you can use the cli to add components.
And the final version on my side is
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/slate-write/editor/style.css",
"baseColor": "slate",
"cssVariables": false
},
"aliases": {
"components": "src/slate-write/editor/components",
"utils": "src/slate-write/editor/lib/utils"
},
"registries": {
"plate-ui": {
"url": "https://platejs.org/r",
"style": "default",
"aliases": {
"ui": "src/slate-write/editor/components/plate-ui"
}
}
}
}
Description
Because https://ui.shadcn.com/r/styles/default/link-element.json is 404
While the old
pnpm dlx @udecode/plate-ui@latest add
also not workingReproduction URL
No response
Reproduction steps
Plate version
39.0.0
Slate React version
0.103.0
Screenshots
No response
Logs
No response
Browsers
No response
Funding