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 { createPlatePlugin, Plate, PlateContent, PlateElement, type PlateElementProps, usePlateEditor } from 'platejs/react';import { InlineCombobox, InlineComboboxContent, InlineComboboxEmpty, InlineComboboxGroup, InlineComboboxGroupLabel, InlineComboboxInput, InlineComboboxItem } from '@/components/ui/inline-combobox';const people = ['Olivia Martin', 'Isabella Nguyen', 'Sofia Davis', 'Ethan Brown'];function MentionInputElement(props: PlateElementProps) { const { children, element } = props; return ( <PlateElement {...props} as='span'> <InlineCombobox element={element} trigger='@'> <InlineComboboxInput /> <InlineComboboxContent> <InlineComboboxEmpty>No results</InlineComboboxEmpty> <InlineComboboxGroup> <InlineComboboxGroupLabel>People</InlineComboboxGroupLabel> {people.map((name) => ( <InlineComboboxItem key={name} value={name} /> ))} </InlineComboboxGroup> </InlineComboboxContent> </InlineCombobox> {children} </PlateElement> );}const MentionInputPlugin = createPlatePlugin({ key: 'mention_input', node: { isElement: true, isInline: true, isVoid: false, component: MentionInputElement, },});export default function InlineComboboxDemo() { const editor = usePlateEditor({ plugins: [MentionInputPlugin], value: [ { type: 'p', children: [ { text: 'Thanks for the update, ' }, { type: 'mention_input', children: [{ text: '' }] }, { text: ' ' }, ], }, ], }); return ( <Plate editor={editor}> <PlateContent className='w-full max-w-sm rounded-md border p-3 text-sm' aria-label='Comment' placeholder='Type @ to mention someone' /> </Plate> );}