From 94c9aeb4b698ad74e314e7423110110a9ad15832 Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Fri, 25 Oct 2024 19:39:34 +0800 Subject: [PATCH] ai leaf --- .../plate-playground-template/src/components/plate-editor.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/plate-playground-template/src/components/plate-editor.tsx b/templates/plate-playground-template/src/components/plate-editor.tsx index 6006198db..eb45d4c87 100644 --- a/templates/plate-playground-template/src/components/plate-editor.tsx +++ b/templates/plate-playground-template/src/components/plate-editor.tsx @@ -2,6 +2,7 @@ import React, { useRef } from 'react'; import { cn, withProps } from '@udecode/cn'; +import { AIPlugin } from '@udecode/plate-ai/react'; import { AlignPlugin } from '@udecode/plate-alignment/react'; import { AutoformatPlugin } from '@udecode/plate-autoformat/react'; import { @@ -132,6 +133,7 @@ import { TableRowElement } from '@/components/plate-ui/table-row-element'; import { TodoListElement } from '@/components/plate-ui/todo-list-element'; import { withDraggables } from '@/components/plate-ui/with-draggables'; +import { AILeaf } from './plate-ui/ai-leaf'; import { BlockContextMenu } from './plate-ui/block-context-menu'; import { DateElement } from './plate-ui/date-element'; import { SlashInputElement } from './plate-ui/slash-input-element'; @@ -435,6 +437,7 @@ export const useMyEditor = () => { override: { components: withDraggables( withPlaceholders({ + [AIPlugin.key]: AILeaf, [DatePlugin.key]: DateElement, [SlashInputPlugin.key]: SlashInputElement, [TogglePlugin.key]: ToggleElement,