Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
"use client"import { BlockSelection } from "@/components/ui/block-selection"import { BlockSelectionPlugin } from "@platejs/selection/react"import { createPlatePlugin, Plate, PlateContent, PlateElement, type PlateElementProps, usePlateEditor,} from "platejs/react"function ParagraphElement(props: PlateElementProps) { return ( <PlateElement {...props} className="relative"> <p>{props.children}</p> <BlockSelection {...props} /> </PlateElement> )}const ParagraphPlugin = createPlatePlugin({ key: "p", node: { component: ParagraphElement },})export default function BlockSelectionDemo() { const editor = usePlateEditor({ plugins: [ParagraphPlugin, BlockSelectionPlugin], value: [ { type: "p", children: [{ text: "Select this block to see the highlight." }], }, ], }) return ( <Plate editor={editor}> <PlateContent readOnly className="w-full max-w-md text-sm leading-relaxed" /> </Plate> )}