Class: LineBreakNode
lexical.LineBreakNode
Hierarchy
-
↳
LineBreakNode
Constructors
constructor
• new LineBreakNode(key?
): LineBreakNode
Parameters
Name | Type |
---|---|
key? | string |
Returns
Overrides
Defined in
packages/lexical/src/nodes/LexicalLineBreakNode.ts:34
Properties
constructor
• constructor: KlassConstructor
<typeof LineBreakNode
>
Overrides
LexicalNode.constructor
Defined in
packages/lexical/src/nodes/LexicalLineBreakNode.ts:25
Methods
createDOM
▸ createDOM(): 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.
Returns
HTMLElement
Overrides
Defined in
packages/lexical/src/nodes/LexicalLineBreakNode.ts:42
exportJSON
▸ exportJSON(): SerializedLexicalNode
Controls how the this node is serialized to JSON. This is important for copy and paste between Lexical editors sharing the same namespace. It's also important if you're serializing to JSON for persistent storage somewhere. See Serialization & Deserialization.
Returns
Overrides
Defined in
packages/lexical/src/nodes/LexicalLineBreakNode.ts:70
getTextContent
▸ getTextContent(): "\n"
Returns the text content of the node. Override this for custom nodes that should have a representation in plain text format (for copy + paste, for example)
Returns
"\n"