Skip to main content

Module: lexical

Classes

Interfaces

Type Aliases

CommandListenerPriority

Ƭ CommandListenerPriority: 0 | 1 | 2 | 3 | 4

Defined in

lexical/src/LexicalEditor.ts:173


CommandPayloadType

Ƭ CommandPayloadType<TCommand>: TCommand extends LexicalCommand<infer TPayload> ? TPayload : never

Type helper for extracting the payload type from a command.

Example

const MY_COMMAND = createCommand<SomeType>();

// ...

editor.registerCommand(MY_COMMAND, payload => {
// Type of `payload` is inferred here. But lets say we want to extract a function to delegate to
handleMyCommand(editor, payload);
return true;
});

function handleMyCommand(editor: LexicalEditor, payload: CommandPayloadType<typeof MY_COMMAND>) {
// `payload` is of type `SomeType`, extracted from the command.
}

Type parameters

NameType
TCommandextends LexicalCommand<unknown>

Defined in

lexical/src/LexicalEditor.ts:203


DOMChildConversion

Ƭ DOMChildConversion: (lexicalNode: LexicalNode, parentLexicalNode: LexicalNode | null | undefined) => LexicalNode | null | undefined

Type declaration

▸ (lexicalNode, parentLexicalNode): LexicalNode | null | undefined

Parameters
NameType
lexicalNodeLexicalNode
parentLexicalNodeLexicalNode | null | undefined
Returns

LexicalNode | null | undefined

Defined in

lexical/src/LexicalNode.ts:141


DOMConversion

Ƭ DOMConversion<T>: Object

Type parameters

NameType
Textends HTMLElement = HTMLElement

Type declaration

NameType
conversionDOMConversionFn<T>
priority0 | 1 | 2 | 3 | 4

Defined in

lexical/src/LexicalNode.ts:131


DOMConversionFn

Ƭ DOMConversionFn<T>: (element: T, parent?: Node) => DOMConversionOutput | null

Type parameters

NameType
Textends HTMLElement = HTMLElement

Type declaration

▸ (element, parent?): DOMConversionOutput | null

Parameters
NameType
elementT
parent?Node
Returns

DOMConversionOutput | null

Defined in

lexical/src/LexicalNode.ts:136


DOMConversionMap

Ƭ DOMConversionMap<T>: Record<NodeName, (node: T) => DOMConversion<T> | null>

Type parameters

NameType
Textends HTMLElement = HTMLElement

Defined in

lexical/src/LexicalNode.ts:146


DOMConversionOutput

Ƭ DOMConversionOutput: Object

Type declaration

NameType
after?(childLexicalNodes: LexicalNode[]) => LexicalNode[]
forChild?DOMChildConversion
nodeLexicalNode | null

Defined in

lexical/src/LexicalNode.ts:152


DOMExportOutput

Ƭ DOMExportOutput: Object

Type declaration

NameType
after?(generatedElement: HTMLElement | null | undefined) => HTMLElement | null | undefined
elementHTMLElement | null

Defined in

lexical/src/LexicalNode.ts:158


EditableListener

Ƭ EditableListener: (editable: boolean) => void

Type declaration

▸ (editable): void

Parameters
NameType
editableboolean
Returns

void

Defined in

lexical/src/LexicalEditor.ts:171


EditorConfig

Ƭ EditorConfig: Object

Type declaration

NameType
disableEvents?boolean
namespacestring
themeEditorThemeClasses

Defined in

lexical/src/LexicalEditor.ts:121


EditorThemeClasses

Ƭ EditorThemeClasses: Object

Index signature

[key: string]: any

Type declaration

NameType
characterLimit?EditorThemeClassName
code?EditorThemeClassName
codeHighlight?Record<string, EditorThemeClassName>
embedBlock?{ base?: EditorThemeClassName ; focus?: EditorThemeClassName }
embedBlock.base?EditorThemeClassName
embedBlock.focus?EditorThemeClassName
hashtag?EditorThemeClassName
heading?{ h1?: EditorThemeClassName ; h2?: EditorThemeClassName ; h3?: EditorThemeClassName ; h4?: EditorThemeClassName ; h5?: EditorThemeClassName ; h6?: EditorThemeClassName }
heading.h1?EditorThemeClassName
heading.h2?EditorThemeClassName
heading.h3?EditorThemeClassName
heading.h4?EditorThemeClassName
heading.h5?EditorThemeClassName
heading.h6?EditorThemeClassName
image?EditorThemeClassName
link?EditorThemeClassName
list?{ listitem?: EditorThemeClassName ; listitemChecked?: EditorThemeClassName ; listitemUnchecked?: EditorThemeClassName ; nested?: { list?: EditorThemeClassName ; listitem?: EditorThemeClassName } ; ol?: EditorThemeClassName ; olDepth?: EditorThemeClassName[] ; ul?: EditorThemeClassName ; ulDepth?: EditorThemeClassName[] }
list.listitem?EditorThemeClassName
list.listitemChecked?EditorThemeClassName
list.listitemUnchecked?EditorThemeClassName
list.nested?{ list?: EditorThemeClassName ; listitem?: EditorThemeClassName }
list.nested.list?EditorThemeClassName
list.nested.listitem?EditorThemeClassName
list.ol?EditorThemeClassName
list.olDepth?EditorThemeClassName[]
list.ul?EditorThemeClassName
list.ulDepth?EditorThemeClassName[]
ltr?EditorThemeClassName
mark?EditorThemeClassName
markOverlap?EditorThemeClassName
paragraph?EditorThemeClassName
quote?EditorThemeClassName
root?EditorThemeClassName
rtl?EditorThemeClassName
table?EditorThemeClassName
tableCell?EditorThemeClassName
tableCellHeader?EditorThemeClassName
tableRow?EditorThemeClassName
text?TextNodeThemeClasses

Defined in

lexical/src/LexicalEditor.ts:73


ElementFormatType

Ƭ ElementFormatType: "left" | "center" | "right" | "justify" | ""

Defined in

lexical/src/nodes/LexicalElementNode.ts:50


ElementPoint

Ƭ ElementPoint: Object

Type declaration

NameType
_selectionRangeSelection | GridSelection
getNode() => ElementNode
is(point: PointType) => boolean
isAtNodeEnd() => boolean
isBefore(point: PointType) => boolean
keyNodeKey
offsetnumber
set(key: NodeKey, offset: number, type: "text" | "element") => void
type"element"

Defined in

lexical/src/LexicalSelection.ts:78


EventHandler

Ƭ EventHandler: (event: Event, editor: LexicalEditor) => void

Type declaration

▸ (event, editor): void

Parameters
NameType
eventEvent
editorLexicalEditor
Returns

void

Defined in

lexical/src/LexicalEvents.ts:924


GridSelectionShape

Ƭ GridSelectionShape: Object

Type declaration

NameType
fromXnumber
fromYnumber
toXnumber
toYnumber

Defined in

lexical/src/LexicalSelection.ts:345


IntentionallyMarkedAsDirtyElement

Ƭ IntentionallyMarkedAsDirtyElement: boolean

Defined in

lexical/src/LexicalEditor.ts:237


Klass

Ƭ Klass<T>: {} & Omit<LexicalNode, "constructor">

Type parameters

NameType
Textends LexicalNode

Defined in

lexical/src/LexicalEditor.ts:40


LexicalCommand

Ƭ LexicalCommand<TPayload>: Record<string, never>

Type parameters

Name
TPayload

Defined in

lexical/src/LexicalEditor.ts:182


MutationListener

Ƭ MutationListener: (nodes: Map<NodeKey, NodeMutation>, payload: { dirtyLeaves: Set<string> ; updateTags: Set<string> }) => void

Type declaration

▸ (nodes, payload): void

Parameters
NameType
nodesMap<NodeKey, NodeMutation>
payloadObject
payload.dirtyLeavesSet<string>
payload.updateTagsSet<string>
Returns

void

Defined in

lexical/src/LexicalEditor.ts:164


NodeKey

Ƭ NodeKey: string

Defined in

lexical/src/LexicalNode.ts:165


NodeMap

Ƭ NodeMap: Map<NodeKey, LexicalNode>

Defined in

lexical/src/LexicalNode.ts:46


NodeMutation

Ƭ NodeMutation: "created" | "updated" | "destroyed"

Defined in

lexical/src/LexicalEditor.ts:142


SerializedEditor

Ƭ SerializedEditor: Object

Type declaration

NameType
editorStateSerializedEditorState

Defined in

lexical/src/LexicalEditor.ts:243


SerializedElementNode

Ƭ SerializedElementNode: Spread<{ children: SerializedLexicalNode[] ; direction: "ltr" | "rtl" | null ; format: ElementFormatType ; indent: number }, SerializedLexicalNode>

Defined in

lexical/src/nodes/LexicalElementNode.ts:40


SerializedGridCellNode

Ƭ SerializedGridCellNode: Spread<{ colSpan: number }, SerializedElementNode>

Defined in

lexical/src/nodes/LexicalGridCellNode.ts:18


SerializedLexicalNode

Ƭ SerializedLexicalNode: Object

Type declaration

NameType
typestring
versionnumber

Defined in

lexical/src/LexicalNode.ts:48


SerializedLineBreakNode

Ƭ SerializedLineBreakNode: Spread<{ type: "linebreak" }, SerializedLexicalNode>

Defined in

lexical/src/nodes/LexicalLineBreakNode.ts:19


SerializedParagraphNode

Ƭ SerializedParagraphNode: Spread<{ type: "paragraph" ; version: 1 }, SerializedElementNode>

Defined in

lexical/src/nodes/LexicalParagraphNode.ts:23


SerializedRootNode

Ƭ SerializedRootNode: SerializedElementNode

Defined in

lexical/src/nodes/LexicalRootNode.ts:20


SerializedTextNode

Ƭ SerializedTextNode: Spread<{ detail: number ; format: number ; mode: TextModeType ; style: string ; text: string }, SerializedLexicalNode>

Defined in

lexical/src/nodes/LexicalTextNode.ts:62


Spread

Ƭ Spread<T1, T2>: Omit<T2, keyof T1> & T1

Type parameters

Name
T1
T2

Defined in

lexical/src/LexicalEditor.ts:38


TextFormatType

Ƭ TextFormatType: "bold" | "underline" | "strikethrough" | "italic" | "code" | "subscript" | "superscript"

Defined in

lexical/src/nodes/LexicalTextNode.ts:73


TextModeType

Ƭ TextModeType: "normal" | "token" | "segmented" | "inert"

Defined in

lexical/src/nodes/LexicalTextNode.ts:84


TextPoint

Ƭ TextPoint: Object

Type declaration

NameType
_selectionRangeSelection | GridSelection
getNode() => TextNode
is(point: PointType) => boolean
isAtNodeEnd() => boolean
isBefore(point: PointType) => boolean
keyNodeKey
offsetnumber
set(key: NodeKey, offset: number, type: "text" | "element") => void
type"text"

Defined in

lexical/src/LexicalSelection.ts:66

Variables

BLUR_COMMAND

Const BLUR_COMMAND: LexicalCommand<FocusEvent>

Defined in

lexical/src/LexicalCommands.ts:71


CAN_REDO_COMMAND

Const CAN_REDO_COMMAND: LexicalCommand<boolean>

Defined in

lexical/src/LexicalCommands.ts:68


CAN_UNDO_COMMAND

Const CAN_UNDO_COMMAND: LexicalCommand<boolean>

Defined in

lexical/src/LexicalCommands.ts:69


CLEAR_EDITOR_COMMAND

Const CLEAR_EDITOR_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:66


CLEAR_HISTORY_COMMAND

Const CLEAR_HISTORY_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:67


CLICK_COMMAND

Const CLICK_COMMAND: LexicalCommand<MouseEvent>

Defined in

lexical/src/LexicalCommands.ts:16


COMMAND_PRIORITY_CRITICAL

Const COMMAND_PRIORITY_CRITICAL: 4

Defined in

lexical/src/LexicalEditor.ts:179


COMMAND_PRIORITY_EDITOR

Const COMMAND_PRIORITY_EDITOR: 0

Defined in

lexical/src/LexicalEditor.ts:175


COMMAND_PRIORITY_HIGH

Const COMMAND_PRIORITY_HIGH: 3

Defined in

lexical/src/LexicalEditor.ts:178


COMMAND_PRIORITY_LOW

Const COMMAND_PRIORITY_LOW: 1

Defined in

lexical/src/LexicalEditor.ts:176


COMMAND_PRIORITY_NORMAL

Const COMMAND_PRIORITY_NORMAL: 2

Defined in

lexical/src/LexicalEditor.ts:177


CONTROLLED_TEXT_INSERTION_COMMAND

Const CONTROLLED_TEXT_INSERTION_COMMAND: LexicalCommand<InputEvent | string>

Defined in

lexical/src/LexicalCommands.ts:22


COPY_COMMAND

Const COPY_COMMAND: LexicalCommand<ClipboardEvent | KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:62


CUT_COMMAND

Const CUT_COMMAND: LexicalCommand<ClipboardEvent | KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:64


DELETE_CHARACTER_COMMAND

Const DELETE_CHARACTER_COMMAND: LexicalCommand<boolean>

Defined in

lexical/src/LexicalCommands.ts:17


DELETE_LINE_COMMAND

Const DELETE_LINE_COMMAND: LexicalCommand<boolean>

Defined in

lexical/src/LexicalCommands.ts:29


DELETE_WORD_COMMAND

Const DELETE_WORD_COMMAND: LexicalCommand<boolean>

Defined in

lexical/src/LexicalCommands.ts:28


DRAGEND_COMMAND

Const DRAGEND_COMMAND: LexicalCommand<DragEvent>

Defined in

lexical/src/LexicalCommands.ts:61


DRAGOVER_COMMAND

Const DRAGOVER_COMMAND: LexicalCommand<DragEvent>

Defined in

lexical/src/LexicalCommands.ts:60


DRAGSTART_COMMAND

Const DRAGSTART_COMMAND: LexicalCommand<DragEvent>

Defined in

lexical/src/LexicalCommands.ts:59


DROP_COMMAND

Const DROP_COMMAND: LexicalCommand<DragEvent>

Defined in

lexical/src/LexicalCommands.ts:56


FOCUS_COMMAND

Const FOCUS_COMMAND: LexicalCommand<FocusEvent>

Defined in

lexical/src/LexicalCommands.ts:70


FORMAT_ELEMENT_COMMAND

Const FORMAT_ELEMENT_COMMAND: LexicalCommand<ElementFormatType>

Defined in

lexical/src/LexicalCommands.ts:57


FORMAT_TEXT_COMMAND

Const FORMAT_TEXT_COMMAND: LexicalCommand<TextFormatType>

Defined in

lexical/src/LexicalCommands.ts:30


INDENT_CONTENT_COMMAND

Const INDENT_CONTENT_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:54


INSERT_LINE_BREAK_COMMAND

Const INSERT_LINE_BREAK_COMMAND: LexicalCommand<boolean>

Defined in

lexical/src/LexicalCommands.ts:19


INSERT_PARAGRAPH_COMMAND

Const INSERT_PARAGRAPH_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:21


KEY_ARROW_DOWN_COMMAND

Const KEY_ARROW_DOWN_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:42


KEY_ARROW_LEFT_COMMAND

Const KEY_ARROW_LEFT_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:37


KEY_ARROW_RIGHT_COMMAND

Const KEY_ARROW_RIGHT_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:34


KEY_ARROW_UP_COMMAND

Const KEY_ARROW_UP_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:40


KEY_BACKSPACE_COMMAND

Const KEY_BACKSPACE_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:47


KEY_DELETE_COMMAND

Const KEY_DELETE_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:51


KEY_ENTER_COMMAND

Const KEY_ENTER_COMMAND: LexicalCommand<KeyboardEvent | null>

Defined in

lexical/src/LexicalCommands.ts:44


KEY_ESCAPE_COMMAND

Const KEY_ESCAPE_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:49


KEY_MODIFIER_COMMAND

Const KEY_MODIFIER_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:72


KEY_SPACE_COMMAND

Const KEY_SPACE_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:46


KEY_TAB_COMMAND

Const KEY_TAB_COMMAND: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:53


MOVE_TO_END

Const MOVE_TO_END: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:36


MOVE_TO_START

Const MOVE_TO_START: LexicalCommand<KeyboardEvent>

Defined in

lexical/src/LexicalCommands.ts:39


OUTDENT_CONTENT_COMMAND

Const OUTDENT_CONTENT_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:55


PASTE_COMMAND

Const PASTE_COMMAND: LexicalCommand<ClipboardEvent | InputEvent>

Defined in

lexical/src/LexicalCommands.ts:25


REDO_COMMAND

Const REDO_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:33


REMOVE_TEXT_COMMAND

Const REMOVE_TEXT_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:27


SELECTION_CHANGE_COMMAND

Const SELECTION_CHANGE_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:15


UNDO_COMMAND

Const UNDO_COMMAND: LexicalCommand<void>

Defined in

lexical/src/LexicalCommands.ts:32


VERSION

Const VERSION: "0.3.11"

Copyright (c) Meta Platforms, Inc. and affiliates.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Defined in

lexical/src/LexicalVersion.ts:9

Functions

$createGridSelection

$createGridSelection(): GridSelection

Returns

GridSelection

Defined in

lexical/src/LexicalSelection.ts:2259


$createLineBreakNode

$createLineBreakNode(): LineBreakNode

Returns

LineBreakNode

Defined in

lexical/src/nodes/LexicalLineBreakNode.ts:90


$createNodeSelection

$createNodeSelection(): NodeSelection

Returns

NodeSelection

Defined in

lexical/src/LexicalSelection.ts:2255


$createParagraphNode

$createParagraphNode(): ParagraphNode

Returns

ParagraphNode

Defined in

lexical/src/nodes/LexicalParagraphNode.ts:132


$createRangeSelection

$createRangeSelection(): RangeSelection

Returns

RangeSelection

Defined in

lexical/src/LexicalSelection.ts:2249


$createTextNode

$createTextNode(text?): TextNode

Parameters

NameTypeDefault value
textstring''

Returns

TextNode

Defined in

lexical/src/nodes/LexicalTextNode.ts:920


$getDecoratorNode

$getDecoratorNode(focus, isBackward): null | LexicalNode

Parameters

NameType
focusPointType
isBackwardboolean

Returns

null | LexicalNode

Defined in

lexical/src/LexicalUtils.ts:1063


$getNearestNodeFromDOMNode

$getNearestNodeFromDOMNode(startingDOM, editorState?): LexicalNode | null

Parameters

NameType
startingDOMNode
editorState?EditorState

Returns

LexicalNode | null

Defined in

lexical/src/LexicalUtils.ts:358


$getNodeByKey

$getNodeByKey<T>(key, _editorState?): T | null

Type parameters

NameType
Textends LexicalNode<T>

Parameters

NameType
keystring
_editorState?EditorState

Returns

T | null

Defined in

lexical/src/LexicalUtils.ts:333


$getPreviousSelection

$getPreviousSelection(): null | RangeSelection | NodeSelection | GridSelection

Returns

null | RangeSelection | NodeSelection | GridSelection

Defined in

lexical/src/LexicalSelection.ts:2365


$getRoot

$getRoot(): RootNode

Returns

RootNode

Defined in

lexical/src/LexicalUtils.ts:412


$getSelection

$getSelection(): null | RangeSelection | NodeSelection | GridSelection

Returns

null | RangeSelection | NodeSelection | GridSelection

Defined in

lexical/src/LexicalSelection.ts:2356


$isDecoratorNode

$isDecoratorNode<T>(node): node is DecoratorNode<T>

Type parameters

Name
T

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is DecoratorNode<T>

Defined in

lexical/src/nodes/LexicalDecoratorNode.ts:36


$isElementNode

$isElementNode(node): node is ElementNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is ElementNode

Defined in

lexical/src/nodes/LexicalElementNode.ts:495


$isGridCellNode

$isGridCellNode(node): node is GridCellNode

Parameters

NameType
nodeundefined | null | LexicalNode | GridCellNode

Returns

node is GridCellNode

Defined in

lexical/src/nodes/LexicalGridCellNode.ts:43


$isGridNode

$isGridNode(node): node is GridNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is GridNode

Defined in

lexical/src/nodes/LexicalGridNode.ts:15


$isGridRowNode

$isGridRowNode(node): node is GridRowNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is GridRowNode

Defined in

lexical/src/nodes/LexicalGridRowNode.ts:15


$isGridSelection

$isGridSelection(x): x is GridSelection

Parameters

NameType
xunknown

Returns

x is GridSelection

Defined in

lexical/src/LexicalSelection.ts:501


$isLeafNode

$isLeafNode(node): node is TextNode | DecoratorNode<unknown> | LineBreakNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is TextNode | DecoratorNode<unknown> | LineBreakNode

Defined in

lexical/src/LexicalUtils.ts:209


$isLineBreakNode

$isLineBreakNode(node): node is LineBreakNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is LineBreakNode

Defined in

lexical/src/nodes/LexicalLineBreakNode.ts:94


$isNodeSelection

$isNodeSelection(x): x is NodeSelection

Parameters

NameType
xunknown

Returns

x is NodeSelection

Defined in

lexical/src/LexicalSelection.ts:1828


$isParagraphNode

$isParagraphNode(node): node is ParagraphNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is ParagraphNode

Defined in

lexical/src/nodes/LexicalParagraphNode.ts:136


$isRangeSelection

$isRangeSelection(x): x is RangeSelection

Parameters

NameType
xunknown

Returns

x is RangeSelection

Defined in

lexical/src/LexicalSelection.ts:341


$isRootNode

$isRootNode(node): node is RootNode

Parameters

NameType
nodeundefined | null | LexicalNode | RootNode

Returns

node is RootNode

Defined in

lexical/src/nodes/LexicalRootNode.ts:125


$isTextNode

$isTextNode(node): node is TextNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is TextNode

Defined in

lexical/src/nodes/LexicalTextNode.ts:924


$nodesOfType

$nodesOfType<T>(klass): LexicalNode[]

Type parameters

NameType
Textends LexicalNode<T>

Parameters

NameType
klassKlass<T>

Returns

LexicalNode[]

Defined in

lexical/src/LexicalUtils.ts:1023


$parseSerializedNode

$parseSerializedNode(serializedNode): LexicalNode

Parameters

NameType
serializedNodeSerializedLexicalNode

Returns

LexicalNode

Defined in

lexical/src/LexicalUpdates.ts:273


$setCompositionKey

$setCompositionKey(compositionKey): void

Parameters

NameType
compositionKeynull | string

Returns

void

Defined in

lexical/src/LexicalUtils.ts:307


$setSelection

$setSelection(selection): void

Parameters

NameType
selectionnull | RangeSelection | NodeSelection | GridSelection

Returns

void

Defined in

lexical/src/LexicalUtils.ts:420


createCommand

createCommand<T>(): LexicalCommand<T>

Type parameters

Name
T

Returns

LexicalCommand<T>

Defined in

lexical/src/LexicalCommands.ts:11


createEditor

createEditor(editorConfig?): LexicalEditor

Parameters

NameType
editorConfig?Object
editorConfig.disableEvents?boolean
editorConfig.editable?boolean
editorConfig.editorState?EditorState
editorConfig.namespace?string
editorConfig.nodes?readonly Klass<LexicalNode>[]
editorConfig.onError?ErrorHandler
editorConfig.parentEditor?LexicalEditor
editorConfig.theme?EditorThemeClasses

Returns

LexicalEditor

Defined in

lexical/src/LexicalEditor.ts:316