Skip to main content

Class: CodeHighlightNode

@lexical/code.CodeHighlightNode

Hierarchy

Constructors

constructor

new CodeHighlightNode(text, highlightType?, key?)

Parameters

NameType
textstring
highlightType?null | string
key?string

Overrides

TextNode.constructor

Defined in

lexical-code/src/CodeHighlightNode.ts:101

Methods

createDOM

createDOM(config): HTMLElement

Parameters

NameType
configEditorConfig

Returns

HTMLElement

Overrides

TextNode.createDOM

Defined in

lexical-code/src/CodeHighlightNode.ts:128


createParentElementNode

createParentElementNode(): ElementNode

Returns

ElementNode

Overrides

TextNode.createParentElementNode

Defined in

lexical-code/src/CodeHighlightNode.ts:172


getHighlightType

getHighlightType(): undefined | null | string

Returns

undefined | null | string

Defined in

lexical-code/src/CodeHighlightNode.ts:123


isParentRequired

isParentRequired(): true

Returns

true

Overrides

TextNode.isParentRequired

Defined in

lexical-code/src/CodeHighlightNode.ts:168


setFormat

setFormat(format): CodeHighlightNode

Parameters

NameType
formatnumber

Returns

CodeHighlightNode

Overrides

TextNode.setFormat

Defined in

lexical-code/src/CodeHighlightNode.ts:164


updateDOM

updateDOM(prevNode, dom, config): boolean

Parameters

NameType
prevNodeCodeHighlightNode
domHTMLElement
configEditorConfig

Returns

boolean

Overrides

TextNode.updateDOM

Defined in

lexical-code/src/CodeHighlightNode.ts:138


clone

Static clone(node): CodeHighlightNode

Parameters

NameType
nodeCodeHighlightNode

Returns

CodeHighlightNode

Overrides

TextNode.clone

Defined in

lexical-code/src/CodeHighlightNode.ts:115


getType

Static getType(): string

Returns

string

Overrides

TextNode.getType

Defined in

lexical-code/src/CodeHighlightNode.ts:111