Class: HeadingNode
@lexical/rich-text.HeadingNode
Hierarchy
-
↳
HeadingNode
Constructors
constructor
• new HeadingNode(tag
, key?
): HeadingNode
Parameters
Name | Type |
---|---|
tag | HeadingTagType |
key? | string |
Returns
Overrides
Defined in
packages/lexical-rich-text/src/index.ts:232
Methods
collapseAtStart
▸ collapseAtStart(): true
Returns
true
Overrides
Defined in
packages/lexical-rich-text/src/index.ts:373
createDOM
▸ createDOM(config
): HTMLElement
Parameters
Name | Type |
---|---|
config | EditorConfig |
Returns
HTMLElement
Overrides
ElementNode.createDOM
Defined in
packages/lexical-rich-text/src/index.ts:243
exportDOM
▸ exportDOM(editor
): DOMExportOutput
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
Returns
Overrides
ElementNode.exportDOM
Defined in
packages/lexical-rich-text/src/index.ts:313
exportJSON
▸ exportJSON(): SerializedHeadingNode
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
packages/lexical-rich-text/src/index.ts:343
extractWithChild
▸ extractWithChild(): boolean
Returns
boolean
Overrides
Defined in
packages/lexical-rich-text/src/index.ts:383
getTag
▸ getTag(): HeadingTagType
Returns
Defined in
packages/lexical-rich-text/src/index.ts:237
insertNewAfter
▸ insertNewAfter(selection?
, restoreSelection?
): ParagraphNode
| HeadingNode
Parameters
Name | Type | Default value |
---|---|---|
selection? | RangeSelection | undefined |
restoreSelection | boolean | true |
Returns
Overrides
Defined in
packages/lexical-rich-text/src/index.ts:353
updateDOM
▸ updateDOM(prevNode
, dom
): boolean
Parameters
Name | Type |
---|---|
prevNode | HeadingNode |
dom | HTMLElement |
Returns
boolean
Overrides
ElementNode.updateDOM
Defined in
packages/lexical-rich-text/src/index.ts:255
clone
▸ clone(node
): HeadingNode
Parameters
Name | Type |
---|---|
node | HeadingNode |
Returns
Overrides
ElementNode.clone
Defined in
packages/lexical-rich-text/src/index.ts:228
getType
▸ getType(): string
Returns
string
Overrides
ElementNode.getType
Defined in
packages/lexical-rich-text/src/index.ts:224
importDOM
▸ importDOM(): null
| DOMConversionMap
Returns
null
| DOMConversionMap
Overrides
ElementNode.importDOM
Defined in
packages/lexical-rich-text/src/index.ts:259
importJSON
▸ importJSON(serializedNode
): HeadingNode
Parameters
Name | Type |
---|---|
serializedNode | SerializedHeadingNode |
Returns
Overrides
ElementNode.importJSON