API reference: @salmonui/rich-text
RichTextMentionsinterface
import type { RichTextMentions } from '@salmonui/rich-text';interface RichTextMentions<T = MentionItem> {
readonly trigger?: string;
readonly items?: readonly T[];
readonly onSearch?: (text: string) => Promise<readonly T[]>;
readonly renderItem?: (context: MentionRenderItemContext<T>) => ReactNode;
readonly mentionProps?: Omit<MentionProps<T>, 'editor' | 'children' | 'target' | 'data' | 'triggers' | 'renderItem'>;
}
| Name | Signature | Description |
|---|---|---|
triggeroptional | readonly trigger?: string; | Trigger character (default |
itemsoptional | readonly items?: readonly T[]; | |
onSearchoptional | readonly onSearch?: (text: string) => Promise<readonly T[]>; | Remote suggestions for the typed text. |
renderItemoptional | readonly renderItem?: (context: MentionRenderItemContext<T>) => ReactNode; | |
mentionPropsoptional | readonly mentionProps?: Omit<MentionProps<T>, 'editor' | 'children' | 'target' | 'data' | 'triggers' | 'renderItem'>; | Further Mention props (labels, search options, events). |