Class: FrontmatterNode

Represents the frontmatter of the markdown document. Use "$createFrontmatterNode" to construct one.

Extends

  • DecoratorNode<JSX.Element>

Constructors

new FrontmatterNode()

new FrontmatterNode(code, key?): FrontmatterNode

Parameters

ParameterType
codestring
key?string

Returns

FrontmatterNode

Overrides

DecoratorNode<JSX.Element>.constructor

Methods

createDOM()

createDOM(_config): HTMLDivElement

Parameters

ParameterType
_configEditorConfig

Returns

HTMLDivElement

Overrides

DecoratorNode.createDOM


decorate()

decorate(editor): Element

Parameters

ParameterType
editorLexicalEditor

Returns

Element

Overrides

DecoratorNode.decorate


exportJSON()

exportJSON(): SerializedFrontmatterNode

Returns

SerializedFrontmatterNode

Overrides

DecoratorNode.exportJSON


getYaml()

getYaml(): string

Returns

string


isKeyboardSelectable()

isKeyboardSelectable(): boolean

Returns

boolean

Overrides

DecoratorNode.isKeyboardSelectable


setYaml()

setYaml(yaml): void

Parameters

ParameterType
yamlstring

Returns

void


updateDOM()

updateDOM(): false

Returns

false

Overrides

DecoratorNode.updateDOM


clone()

static clone(node): FrontmatterNode

Parameters

ParameterType
nodeFrontmatterNode

Returns

FrontmatterNode

Overrides

DecoratorNode.clone


getType()

static getType(): string

Returns

string

Overrides

DecoratorNode.getType


importJSON()

static importJSON(serializedNode): FrontmatterNode

Parameters

ParameterType
serializedNodeSerializedFrontmatterNode

Returns

FrontmatterNode

Overrides

DecoratorNode.importJSON

Properties

PropertyType
__yamlstring