Class: ContextMenuOption
@lexical/react/LexicalNodeContextMenuPlugin.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/LexicalNodeContextMenuPlugin.tsx:50
Properties
$onSelect
• $onSelect: () => void
Type declaration
▸ (): void
Returns
void
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:47
$showOn
• Optional
$showOn: (node
: LexicalNode
) => boolean
Type declaration
▸ (node
): boolean
Parameters
Name | Type |
---|---|
node | LexicalNode |
Returns
boolean
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:48
disabled
• disabled: boolean
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:46
key
• key: string
Inherited from
MenuOption.key
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:29
ref
• Optional
ref: MutableRefObject
<null
| HTMLElement
>
Inherited from
MenuOption.ref
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:30
title
• title: string
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:45
type
• type: string
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:44
Methods
setRefElement
▸ setRefElement(element
): void
Parameters
Name | Type |
---|---|
element | null | HTMLElement |
Returns
void
Inherited from
MenuOption.setRefElement
Defined in
packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:38