@lobehub/editor
Version:
A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.
18 lines (17 loc) • 1.01 kB
TypeScript
import type { IElementNode } from './i-element-node';
import type { INode } from './i-node';
import type { IParagraphNode } from './paragraph-node';
import type { IRootNode } from './root-node';
import type { ITextNode } from './text-node';
export declare const INodeHelper: {
appendChild(parent: IElementNode, ...child: INode[]): void;
createElementNode(type: string, attrs?: Record<string, unknown>): IElementNode;
createLikeTextNode(type: string, text: string, attrs?: Record<string, unknown>): ITextNode;
createParagraph(attrs?: Record<string, unknown>): IParagraphNode;
createRootNode(attrs?: Record<string, unknown>): IRootNode;
createTextNode(text: string, attrs?: Record<string, unknown>): ITextNode;
createTypeNode(type: string, attrs?: Record<string, unknown>): INode;
isParagraphNode(node: INode): node is IParagraphNode;
isRootNode(node: INode): node is IRootNode;
isTextNode(node: INode): node is import("lexical/nodes/LexicalTextNode").SerializedTextNode;
};