# Mention Mention nodes fed by your own records through a suggestion list. ## Installation ```bash npx shadcn@latest add litingyes/blocove/rich-text-editor-mention ``` > Typography requires [shadcn/typeset](https://ui.shadcn.com/docs/typeset). Copy `typeset.css` next to your main stylesheet, import it after Tailwind and add the `.typeset-docs` preset. Mention records are your own data. The node stores the id and the label as `data-id` and `data-label`, so the rendered HTML survives a round trip through your backend. ## Usage ### Pass your own records ```tsx import { EditorMention } from "@/components/blocove/rich-text-editor/mention" const users = [ { id: "42", label: "Ada Lovelace" }, { id: "43", label: "Alan Turing" }, ] export function CommentEditor() { return ( ) } ``` ## API Reference ### EditorMention Registers the mention node and the suggestion list built from the records you pass in. | Prop | Type | Default | | --- | --- | --- | | `users` | `MentionUser[]` | `Three demo users` | | `char` | `string` | `"@"` | | `ariaLabel` | `string` | `"Mention"` | | `HTMLAttributes` | `Record` | `{}` | ## Registry dependencies - `litingyes/blocove/rich-text-editor` - `litingyes/blocove/rich-text-editor-extension` - `litingyes/blocove/rich-text-editor-suggestion` Namespace: `npx shadcn@latest add @blocove/rich-text-editor-mention`