Class: CodeTabNode
@lexical/code.CodeTabNode
Hierarchy
↳
CodeTabNode
Methods
createDOM
▸ createDOM(config
): HTMLElement
Parameters
Name | Type |
---|---|
config | EditorConfig |
Returns
HTMLElement
Overrides
TabNode.createDOM
Defined in
lexical-code/src/CodeTabNode.ts:42
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
Overrides
Defined in
lexical-code/src/CodeTabNode.ts:34
updateDOM
▸ updateDOM(prevNode
, dom
, config
): boolean
Parameters
Name | Type |
---|---|
prevNode | TextNode |
dom | HTMLElement |
config | EditorConfig |
Returns
boolean
Overrides
TabNode.updateDOM
Defined in
lexical-code/src/CodeTabNode.ts:53
clone
▸ Static
clone(node
): CodeTabNode
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
Name | Type |
---|---|
node | CodeTabNode |
Returns
Overrides
Defined in
lexical-code/src/CodeTabNode.ts:26
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
Defined in
lexical-code/src/CodeTabNode.ts:22
importJSON
▸ Static
importJSON(_serializedTabNode
): CodeTabNode
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
Name | Type |
---|---|
_serializedTabNode | SerializedTextNode |
Returns
Overrides
Defined in
lexical-code/src/CodeTabNode.ts:30