Installation
npx shadcn@latest add https://platejs.org/r/block-context-menuExamples
Loading...
Files
components/demo.tsx
'use client';
import * as React from 'react';
import { Plate, usePlateEditor } from 'platejs/react';
import { EditorKit } from '@/components/editor/editor-kit';
import { Editor, EditorContainer } from '@/components/ui/editor';
import { DEMO_VALUES } from './values/demo-values';
export default function Demo({ id }: { id: string }) {
  const editor = usePlateEditor({
    plugins: EditorKit,
    value: DEMO_VALUES[id],
  });
  return (
    <Plate editor={editor}>
      <EditorContainer variant="demo">
        <Editor />
      </EditorContainer>
    </Plate>
  );
}
Plate Plus
- Open the menu via the drag button or the three-dot menu on specific blocks (e.g. images)
 - Includes a combobox that filters options as you type
 - Supports nested menu options
 - Advanced actions such as "Ask AI", colors, and commenting
 - Beautifully crafted UI