Components
AI Toolbar Button
AI Toolbar Button
AI toolbar button
Installation
npx @udecode/plate-ui@latest add ai-toolbar-button -r plate-ui
Examples
'use client';
import React from 'react';
import { withRef } from '@udecode/cn';
import { AIChatPlugin } from '@udecode/plate-ai/react';
import { useEditorPlugin } from '@udecode/plate-common/react';
import { ToolbarButton } from './toolbar';
export const AIToolbarButton = withRef<typeof ToolbarButton>(
({ children, ...rest }, ref) => {
const { api } = useEditorPlugin(AIChatPlugin);
return (
<ToolbarButton
ref={ref}
{...rest}
onClick={() => {
api.aiChat.show();
}}
>
{children}
</ToolbarButton>
);
}
);
Plate Plus
In Plate Plus, we provides more advanced styles and complete backend setup
All of the backend setup is available in Potion template.
Build your editor even faster
Complete, deployable AI-powered template with backend.
All components included.
Customizable and extensible.
Get all-accessCustomizable and extensible.