NestedEditorProps interface

The properties of the NestedLexicalEditor React component.

Signature:

export interface NestedEditorProps<T extends Mdast.Content> 

Properties

PropertyModifiersTypeDescription
block?boolean(Optional) Whether or not the editor edits blocks (multiple paragraphs)
contentEditableProps?React.ComponentProps<typeof ContentEditable>(Optional) Props passed to the ContentEditable component.
getContent(mdastNode: T) => Mdast.Content[]A function that returns the phrasing content of the mdast node. In most cases, this will be the children property of the mdast node, but you can also have multiple nested nodes with their own children.
getUpdatedMdastNode(mdastNode: T, children: Mdast.Content[]) => TA function that should return the updated mdast node based on the original mdast node and the new content (serialized as mdast tree) produced by the editor.