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:209
Properties
constructor
• constructor: KlassConstructor
<typeof LexicalNode
>
Defined in
lexical/src/LexicalNode.ts:160
importDOM
▪ Static
Optional
importDOM: () => null
| DOMConversionMap
<any
>
Type declaration
▸ (): null
| DOMConversionMap
<any
>
Returns
null
| DOMConversionMap
<any
>
Defined in
lexical/src/LexicalNode.ts:207
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:763
createParentElementNode
▸ createParentElementNode(): ElementNode
The creation logic for any required parent. Should be implemented if isParentRequired returns true.