Module: @lexical/react/LexicalTypeaheadMenuPlugin
References
MenuOption
Re-exports MenuOption
MenuRenderFn
Re-exports MenuRenderFn
MenuResolution
Re-exports MenuResolution
Type Aliases
MenuTextMatch
Ƭ MenuTextMatch: Object
Type declaration
Name | Type |
---|---|
leadOffset | number |
matchingString | string |
replaceableString | string |
Defined in
packages/lexical-react/src/shared/LexicalMenu.ts:37
TriggerFn
Ƭ TriggerFn: (text
: string
, editor
: LexicalEditor
) => MenuTextMatch
| null
Type declaration
▸ (text
, editor
): MenuTextMatch
| null
Parameters
Name | Type |
---|---|
text | string |
editor | LexicalEditor |
Returns
MenuTextMatch
| null
Defined in
packages/lexical-react/src/shared/LexicalMenu.ts:577
TypeaheadMenuPluginProps
Ƭ TypeaheadMenuPluginProps<TOption
>: Object
Type parameters
Name | Type |
---|---|
TOption | extends MenuOption |
Type declaration
Name | Type |
---|---|
anchorClassName? | string |
commandPriority? | CommandListenerPriority |
menuRenderFn | MenuRenderFn <TOption > |
onClose? | () => void |
onOpen? | (resolution : MenuResolution ) => void |
onQueryChange | (matchingString : string | null ) => void |
onSelectOption | (option : TOption , textNodeContainingQuery : TextNode | null , closeMenu : () => void , matchingString : string ) => void |
options | TOption [] |
parent? | HTMLElement |
triggerFn | TriggerFn |
Defined in
packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx:184
Variables
PUNCTUATION
• Const
PUNCTUATION: "\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;"
Defined in
packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx:35
SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND
• Const
SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand
<{ index
: number
; option
: MenuOption
}>
Defined in
packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx:142
Functions
LexicalTypeaheadMenuPlugin
▸ LexicalTypeaheadMenuPlugin<TOption
>(«destructured»
): JSX.Element
| null
Type parameters
Name | Type |
---|---|
TOption | extends MenuOption |
Parameters
Name | Type |
---|---|
«destructured» | TypeaheadMenuPluginProps <TOption > |
Returns
JSX.Element
| null
Defined in
packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx:202
getScrollParent
▸ getScrollParent(element
, includeHidden
): HTMLElement
| HTMLBodyElement
Parameters
Name | Type |
---|---|
element | HTMLElement |
includeHidden | boolean |
Returns
HTMLElement
| HTMLBodyElement
Defined in
packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx:110
useBasicTypeaheadTriggerMatch
▸ useBasicTypeaheadTriggerMatch(trigger
, «destructured»
): TriggerFn
Parameters
Name | Type | Default value |
---|---|---|
trigger | string | undefined |
«destructured» | Object | undefined |
› maxLength? | number | 75 |
› minLength? | number | 1 |
Returns
Defined in
packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx:147
useDynamicPositioning
▸ useDynamicPositioning(resolution
, targetElement
, onReposition
, onVisibilityChange?
): void
Parameters
Name | Type |
---|---|
resolution | null | MenuResolution |
targetElement | null | HTMLElement |
onReposition | () => void |
onVisibilityChange? | (isInView : boolean ) => void |
Returns
void