Class: LexicalNode
lexical.LexicalNode
Hierarchy
-
LexicalNode
↳
TextNode
Constructors
constructor
• new LexicalNode(key?
): LexicalNode
Parameters
Name | Type |
---|---|
key? | string |
Returns
Defined in
lexical/src/LexicalNode.ts:208
Properties
constructor
• constructor: KlassConstructor
<typeof LexicalNode
>
Defined in
lexical/src/LexicalNode.ts:159
importDOM
▪ Static
Optional
importDOM: () => null
| DOMConversionMap
<any
>
Type declaration
▸ (): null
| DOMConversionMap
<any
>
Returns
null
| DOMConversionMap
<any
>
Defined in
lexical/src/LexicalNode.ts:206
Methods
createDOM
▸ createDOM(_config
, _editor
): HTMLElement
Called during the reconciliation process to determine which nodes to insert into the DOM for this Lexical Node.
This method must return exactly one HTMLElement. Nested elements are not supported.
Do not attempt to update the Lexical EditorState during this phase of the update lifecyle.
Parameters
Name | Type | Description |
---|---|---|
_config | EditorConfig | allows access to things like the EditorTheme (to apply classes) during reconciliation. |
_editor | LexicalEditor | allows access to the editor for context during reconciliation. |
Returns
HTMLElement
Defined in
lexical/src/LexicalNode.ts:759
createParentElementNode
▸ createParentElementNode(): ElementNode
The creation logic for any required parent. Should be implemented if isParentRequired returns true.