Skip to main content

Class: ContextMenuOption

@lexical/react/LexicalNodeContextMenuPlugin.ContextMenuOption

Hierarchy

  • MenuOption

    ContextMenuOption

Constructors

constructor

new ContextMenuOption(title, options): ContextMenuOption

Parameters

NameType
titlestring
optionsObject
options.$onSelect() => void
options.$showOn?(node: LexicalNode) => boolean
options.disabled?boolean

Returns

ContextMenuOption

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
NameType
nodeLexicalNode
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

NameType
elementnull | HTMLElement

Returns

void

Inherited from

MenuOption.setRefElement

Defined in

packages/lexical-react/src/LexicalNodeContextMenuPlugin.tsx:38