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:95
Methods
createDOM
▸ createDOM(config
): HTMLElement
Parameters
Name | Type |
---|---|
config | EditorConfig |
Returns
HTMLElement
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:121
createParentElementNode
▸ createParentElementNode(): ElementNode
Returns
Overrides
TextNode.createParentElementNode
Defined in
lexical-code/src/CodeHighlightNode.ts:165
getHighlightType
▸ getHighlightType(): undefined
| null
| string
Returns
undefined
| null
| string
Defined in
lexical-code/src/CodeHighlightNode.ts:116
isParentRequired
▸ isParentRequired(): true
Returns
true
Overrides
TextNode.isParentRequired
Defined in
lexical-code/src/CodeHighlightNode.ts:161
setFormat
▸ setFormat(format
): CodeHighlightNode
Parameters
Name | Type |
---|---|
format | number |
Returns
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:157
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:131
clone
▸ Static
clone(node
): CodeHighlightNode
Parameters
Name | Type |
---|---|
node | CodeHighlightNode |
Returns
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:108
getType
▸ Static
getType(): string
Returns
string
Overrides
Defined in
lexical-code/src/CodeHighlightNode.ts:104