Class: ContextMenuOption
@lexical/react/LexicalContextMenuPlugin.ContextMenuOption
Hierarchy
-
MenuOption↳
ContextMenuOption
Constructors
constructor
• new ContextMenuOption(title, options): ContextMenuOption
Parameters
| Name | Type |
|---|---|
title | string |
options | Object |
options.$onSelect | () => void |
options.$showOn? | (node: LexicalNode) => boolean |
options.disabled? | boolean |
Returns
Overrides
MenuOption.constructor
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:58
Properties
$onSelect
• $onSelect: () => void
Type declaration
▸ (): void
Returns
void
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:55
$showOn
• Optional $showOn: (node: LexicalNode) => boolean
Type declaration
▸ (node): boolean
Parameters
| Name | Type |
|---|---|
node | LexicalNode |
Returns
boolean
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:56
disabled
• disabled: boolean
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:54
key
• key: string
Inherited from
MenuOption.key
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:38
ref
• Optional ref: MutableRefObject<null | HTMLElement>
Inherited from
MenuOption.ref
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:39
title
• title: string
Defined in
packages/lexical-react/src/LexicalContextMenuPlugin.tsx:53
Methods
setRefElement
▸ setRefElement(element): void
Parameters
| Name | Type |
|---|---|
element | null | HTMLElement |
Returns
void
Inherited from
MenuOption.setRefElement