evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build an editor setup that renders rich mention suggestions with custom rows and inserts alternate text when a suggestion is chosen.
@jo, the dropdown rows show an avatar placeholder, the primary label, and the handle (prefixed with @) for each suggestion object { id, label, handle, avatarUrl }; rows display exactly the provided label and handle text. @test@vh into the document while the visible mention text stays "Veronica Hill". @testinsert override, the inserted content uses that override (e.g., @veronica) while the mention still displays the label. @testid, label, handle, avatarUrl, and any optional note field so that the same data can be read back later. @testexport async function createMentionEditor(rootElement, options);
/**
* rootElement: HTMLElement where the rich text editor is mounted.
* options.feeds: array of feed configs with marker, name, and initial items [{ id, label, handle, avatarUrl, note?, insert? }].
* options.renderRow: optional function(item) => HTMLElement|string for custom dropdown rendering.
* options.onReady?: callback receiving the editor instance once initialized.
* Returns: editor instance with mention support configured.
*/
export function updateFeedItems(editor, feedName, items);
/**
* Replaces the feed items for the named feed with the provided array of suggestion objects.
*/Provides mention suggestion dropdowns and mention insertion support.
Provides the base rich text editor used for rendering and typing.