Skip to main content

Module: @lexical/devtools-core

Type Aliases

CollapsibleNodeTree

Ƭ CollapsibleNodeTree: Object

Type declaration

NameType
childrenCollapsibleNodeTree[]
idstring
namestring
parentnull | CollapsibleNodeTree

Defined in

packages/lexical-devtools-core/src/tree-view/treeUtils.ts:31


CustomPrintNodeFn

Ƭ CustomPrintNodeFn: (node: LexicalNode, obfuscateText?: boolean) => string

Type declaration

▸ (node, obfuscateText?): string

Parameters
NameType
nodeLexicalNode
obfuscateText?boolean
Returns

string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:35


LexicalCommandLog

Ƭ LexicalCommandLog: ReadonlyArray<{ index: number } & LexicalCommand<unknown> & { payload: unknown }>

Defined in

packages/lexical-devtools-core/src/useLexicalCommandsLog.ts:14


NodePropDetails

Ƭ NodePropDetails: Object

Index signature

▪ [key: string]: string | number | boolean | null

Defined in

packages/lexical-devtools-core/src/tree-view/treeUtils.ts:38


SelectionPropDetails

Ƭ SelectionPropDetails: Object

Index signature

▪ [key: string]: any

Defined in

packages/lexical-devtools-core/src/tree-view/treeUtils.ts:42

Functions

TreeView

TreeView(props): ReactNode

Parameters

NameType
props{ editorState: EditorState ; generateContent: (exportDOM: boolean) => Promise<string> ; setEditorReadOnly: (isReadonly: boolean) => void ; setEditorState: (state: EditorState, options?: EditorSetOptions) => void ; timeTravelButtonClassName: string ; timeTravelPanelButtonClassName: string ; timeTravelPanelClassName: string ; timeTravelPanelSliderClassName: string ; treeTypeButtonClassName: string ; viewClassName: string } & RefAttributes<HTMLPreElement>

Returns

ReactNode

Defined in

packages/lexical-devtools-core/src/TreeView.tsx:16


createNodeTreeFromLexicalNode

createNodeTreeFromLexicalNode(lexicalNode): CollapsibleNodeTree

Parameters

NameType
lexicalNodeLexicalNode

Returns

CollapsibleNodeTree

Defined in

packages/lexical-devtools-core/src/tree-view/treeUtils.ts:47


generateContent

generateContent(editor, commandsLog, exportDOM, customPrintNode?, obfuscateText?): string

Parameters

NameTypeDefault value
editorLexicalEditorundefined
commandsLogLexicalCommandLogundefined
exportDOMbooleanundefined
customPrintNode?CustomPrintNodeFnundefined
obfuscateTextbooleanfalse

Returns

string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:93


getTreeNodePropDetails

getTreeNodePropDetails(editor, keyID): string | null

Parameters

NameType
editorLexicalEditor
keyIDstring

Returns

string | null

Defined in

packages/lexical-devtools-core/src/tree-view/treeUtils.ts:69


prepareEditorSelection

prepareEditorSelection(editorState): string

Parameters

NameType
editorStateEditorState

Returns

string

Defined in

packages/lexical-devtools-core/src/tree-view/treeUtils.ts:174


printDetailProperties

printDetailProperties(nodeOrSelection): string

Parameters

NameType
nodeOrSelectionTextNode

Returns

string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:330


printFormatProperties

printFormatProperties(nodeOrSelection): string

Parameters

NameType
nodeOrSelectionRangeSelection | TextNode

Returns

string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:356


printModeProperties

printModeProperties(nodeOrSelection): string

Parameters

NameType
nodeOrSelectionTextNode

Returns

string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:343


printRelProperties

printRelProperties(node): null | string

Parameters

NameType
nodeLinkNode

Returns

null | string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:380


printTargetProperties

printTargetProperties(node): null | string

Parameters

NameType
nodeLinkNode

Returns

null | string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:371


printTextFormatProperties

printTextFormatProperties(nodeOrSelection): string

Parameters

NameType
nodeOrSelectionParagraphNode

Returns

string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:295


printTitleProperties

printTitleProperties(node): null | string

Parameters

NameType
nodeLinkNode

Returns

null | string

Defined in

packages/lexical-devtools-core/src/generateContent.ts:389


registerLexicalCommandLogger

registerLexicalCommandLogger(editor, setLoggedCommands): () => void

Parameters

NameType
editorLexicalEditor
setLoggedCommands(v: (oldValue: LexicalCommandLog) => LexicalCommandLog) => void

Returns

fn

▸ (): void

Returns

void

Defined in

packages/lexical-devtools-core/src/useLexicalCommandsLog.ts:18


useLexicalCommandsLog

useLexicalCommandsLog(editor): LexicalCommandLog

Parameters

NameType
editorLexicalEditor

Returns

LexicalCommandLog

Defined in

packages/lexical-devtools-core/src/useLexicalCommandsLog.ts:57