title | description | component | docs | |||||
---|---|---|---|---|---|---|---|---|
Cloud |
Integrate cloud functionality to enable seamless access to cloud-based resources. |
true |
|
npx shadcx@latest add cloud -r plate-ui
Install the following dependencies:
Copy and paste the following code into your project.
Update the import paths to match your project setup.
const plugins = createMyPlugins(
[
...basicNodesPlugins,
createCloudPlugin({
options: {},
}),
createCloudAttachmentPlugin(),
createCloudImagePlugin({
options: {
maxInitialWidth: 320,
maxInitialHeight: 320,
minResizeWidth: 100,
maxResizeWidth: 720,
},
}),
],
{
components: {
...plateUI,
[CloudAttachmentPlugin.key]: CloudAttachmentElement,
[CloudImagePlugin.key]: CloudImageElement,
},
}
);
export default function CloudDemo() {
return (
<Plate<MyValue> plugins={plugins} initialValue={cloudValue}>
<FixedToolbar>
<CloudToolbarButtons />
</FixedToolbar>
<Editor />
</Plate>
);
}