Skip to content

Function: createSuggestionMenu() ​

ts
function createSuggestionMenu(editor, options): SuggestionMenu;

Behaviour and accessibility for an inline suggestion list opened by a typed character: a slash command menu (/) or mentions (@). Focus stays in the editor (combobox-style): ArrowUp/ArrowDown move the highlight, Enter or Tab choose, Escape closes. The editor gets aria-controls, aria-activedescendant and aria-autocomplete="list", and a live region announces the number of options. Renders and positions nothing.

Parameters ​

ParameterType
editorEditor
optionsSuggestionMenuOptions

Returns ​

SuggestionMenu