Command Palette

Search for a command to run...

Ghost Text

Installation

npx shadcn@canary add https://platejs.org/r/ghost-text

Examples

Loading...
Files
components/copilot-demo.tsx
'use client';

import * as React from 'react';

import { Plate } from '@udecode/plate/react';

import { editorPlugins } from '@/components/editor/plugins/editor-plugins';
import { useCreateEditor } from '@/components/editor/use-create-editor';
import { copilotValue } from '@/registry/examples/values/copilot-value';
import { Editor, EditorContainer } from '@/components/ui/editor';

import { copilotPlugins } from '../components/editor/plugins/copilot-plugins';

export default function CopilotDemo() {
  const editor = useCreateEditor({
    plugins: [...copilotPlugins, ...editorPlugins],
    value: copilotValue,
  });

  return (
    <Plate editor={editor}>
      <EditorContainer variant="demo">
        <Editor />
      </EditorContainer>
    </Plate>
  );
}

Plate Plus

  • Suggestions powered by AI SDK (OpenAI). Code available in Potion template
  • Rich text suggestions including marks and links
  • Hover card with additional information
  • Beautifully crafted UI