lexical.TabNode
Hierarchy↳ TabNode
• new TabNode(key?
): TabNode
packages/lexical/src/nodes/LexicalTabNode.ts:36
Methods canInsertTextAfter▸ canInsertTextAfter(): boolean
This method is meant to be overridden by TextNode subclasses to control the behavior of those nodes when a user event would cause text to be inserted after them in the editor. If true, Lexical will attempt to insert text into this node. If false, it will insert the text in a new sibling node.
Returnsboolean
true if text can be inserted after the node, false otherwise.
Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:96
canInsertTextBefore▸ canInsertTextBefore(): boolean
This method is meant to be overridden by TextNode subclasses to control the behavior of those nodes when a user event would cause text to be inserted before them in the editor. If true, Lexical will attempt to insert text into this node. If false, it will insert the text in a new sibling node.
Returnsboolean
true if text can be inserted before the node, false otherwise.
Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:92
createDOM▸ createDOM(config
): 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 lifecycle.
Parameters Name Type Descriptionconfig
EditorConfig
allows access to things like the EditorTheme (to apply classes) during reconciliation. Returns
HTMLElement
packages/lexical/src/nodes/LexicalTabNode.ts:45
setDetail▸ setDetail(detail
): this
Sets the node detail to the provided TextDetailType or 32-bit integer. Note that the TextDetailType version of the argument can only specify one detail value and doing so will remove all other detail values that may be applied to the node. For toggling behavior, consider using TextNode.toggleDirectionless or TextNode.toggleUnmergeable
Parameters Name Type Descriptiondetail
number
| TextDetailType
TextDetailType or 32-bit integer representing the node detail. Returns
this
this TextNode. // TODO 0.12 This should just be a string
.
packages/lexical/src/nodes/LexicalTabNode.ts:82
setMode▸ setMode(type
): this
Sets the mode of the node.
Parameters Returnsthis
this TextNode.
Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:87
setTextContent▸ setTextContent(text
): this
Sets the text content of the node.
Parameters Name Type Descriptiontext
string
the string to set as the text value of the node. Returns
this
this TextNode.
Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:60
spliceText▸ spliceText(offset
, delCount
, newText
, moveSelection?
): TextNode
Inserts the provided text into this TextNode at the provided offset, deleting the number of characters specified. Can optionally calculate a new selection after the operation is complete.
Parameters Name Type Descriptionoffset
number
the offset at which the splice operation should begin. delCount
number
the number of characters to delete, starting from the offset. newText
string
the text to insert into the TextNode at the offset. moveSelection?
boolean
optional, whether or not to move selection to the end of the inserted substring. Returns
this TextNode.
Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:68
clone▸ 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 Returns Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:32
getType▸ 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.
Returnsstring
packages/lexical/src/nodes/LexicalTabNode.ts:28
importDOM▸ importDOM(): null
| DOMConversionMap
null
| DOMConversionMap
packages/lexical/src/nodes/LexicalTabNode.ts:41
importJSON▸ 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 Returns Overrides Defined inpackages/lexical/src/nodes/LexicalTabNode.ts:56
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4