Skip to main content

Class: TabNode

lexical.TabNode

Hierarchy

Constructors

constructor

new TabNode(key?)

Parameters

NameType
key?string

Overrides

TextNode.constructor

Defined in

lexical/src/nodes/LexicalTabNode.ts:40

Methods

canInsertTextAfter

canInsertTextAfter(): boolean

Returns

boolean

Overrides

TextNode.canInsertTextAfter

Defined in

lexical/src/nodes/LexicalTabNode.ts:80


canInsertTextBefore

canInsertTextBefore(): boolean

Returns

boolean

Overrides

TextNode.canInsertTextBefore

Defined in

lexical/src/nodes/LexicalTabNode.ts:76


exportJSON

exportJSON(): SerializedTextNode

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

SerializedTextNode

Overrides

TextNode.exportJSON

Defined in

lexical/src/nodes/LexicalTabNode.ts:56


setDetail

setDetail(_detail): TabNode

Parameters

NameType
_detailnumber | TextDetailType

Returns

TabNode

Overrides

TextNode.setDetail

Defined in

lexical/src/nodes/LexicalTabNode.ts:68


setMode

setMode(_type): TabNode

Parameters

NameType
_typeTextModeType

Returns

TabNode

Overrides

TextNode.setMode

Defined in

lexical/src/nodes/LexicalTabNode.ts:72


setTextContent

setTextContent(_text): TabNode

Parameters

NameType
_textstring

Returns

TabNode

Overrides

TextNode.setTextContent

Defined in

lexical/src/nodes/LexicalTabNode.ts:64


clone

Static clone(node): TabNode

Clones this node, creating a new node with a different key and adding it to the EditorState (but not attaching it anywhere!). All nodes must implement this method.

Parameters

NameType
nodeTabNode

Returns

TabNode

Overrides

TextNode.clone

Defined in

lexical/src/nodes/LexicalTabNode.ts:31


getType

Static getType(): string

Returns the string type of this node. Every node must implement this and it MUST BE UNIQUE amongst nodes registered on the editor.

Returns

string

Overrides

TextNode.getType

Defined in

lexical/src/nodes/LexicalTabNode.ts:27


importDOM

Static importDOM(): null | DOMConversionMap<HTMLElement>

Returns

null | DOMConversionMap<HTMLElement>

Overrides

TextNode.importDOM

Defined in

lexical/src/nodes/LexicalTabNode.ts:45


importJSON

Static importJSON(serializedTabNode): TabNode

Controls how the this node is deserialized from JSON. This is usually boilerplate, but provides an abstraction between the node implementation and serialized interface that can be important if you ever make breaking changes to a node schema (by adding or removing properties). See Serialization & Deserialization.

Parameters

NameType
serializedTabNodeSerializedTextNode

Returns

TabNode

Overrides

TextNode.importJSON

Defined in

lexical/src/nodes/LexicalTabNode.ts:49