evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a helper that inserts marker-based mentions into an editor by delegating to the dependency's mention insertion behavior instead of manually editing text. The helper should trust the dependency to validate markers, merge selection attributes, and manage spacing rules.
#, id #team, label Team, and custom text Team Blue, calling the helper inserts the mention text at the caret and appends a single trailing space when the next character is not whitespace. @testexport interface MentionRequest {
marker: string;
id: string;
label: string;
text?: string;
}
export function insertMention(editor: unknown, mention: MentionRequest): void;Provides marker-aware mention insertion and validation.