Class: CodeHighlightNode
@lexical/code.CodeHighlightNode
Hierarchy
↳
CodeHighlightNode
Constructors
constructor
• new CodeHighlightNode(text
, highlightType?
, key?
)
Parameters
Name | Type |
---|---|
text | string |
highlightType? | null | string |
key? | string |
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:101
Methods
createDOM
▸ createDOM(config
): HTMLElement
Parameters
Name | Type |
---|---|
config | EditorConfig |
Returns
HTMLElement
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:128
createParentElementNode
▸ createParentElementNode(): ElementNode
Returns
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
Name | Type |
---|---|
format | number |
Returns
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:164
updateDOM
▸ updateDOM(prevNode
, dom
, config
): boolean
Parameters
Name | Type |
---|---|
prevNode | CodeHighlightNode |
dom | HTMLElement |
config | EditorConfig |
Returns
boolean
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:138
clone
▸ Static
clone(node
): CodeHighlightNode
Parameters
Name | Type |
---|---|
node | CodeHighlightNode |
Returns
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:115
getType
▸ Static
getType(): string
Returns
string
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:111