Mention feature for CKEditor 5 providing smart autocompletion functionality for @mentions and #tags.
72
Build an editor instance that supports mentions with asynchronous suggestions. The mention feed must debounce outgoing queries and ignore stale responses so the dropdown always reflects the most recent user input.
@ then rapidly adding characters triggers a single feed request after 100ms of inactivity; intermediate keystrokes do not fire extra requests. @test@generates
export type MentionItem = {
id: string;
label?: string;
text?: string;
[key: string]: unknown;
};
export type MentionOptions = {
marker?: string;
debounceMs?: number;
dropdownLimit?: number;
};
export async function createMentionEditor(
rootElement: HTMLElement,
fetchSuggestions: (marker: string, query: string) => Promise<MentionItem[]>,
options?: MentionOptions
): Promise<{ destroy(): Promise<void> }>;Provides mention UI with debounced async feeds and stale-response safeguards.
Install with Tessl CLI
npx tessl i tessl/npm-ckeditor--ckeditor5-mentionevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10