UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

31 lines (30 loc) 1.39 kB
import { EditorConfig, ElementNode, SerializedElementNode } from 'lexical'; export type SerializedPlaceholderNode = SerializedElementNode; export declare class PlaceholderNode extends ElementNode { static getType(): string; static clone(node: PlaceholderNode): PlaceholderNode; static importJSON(serializedNode: SerializedPlaceholderNode): PlaceholderNode; createDOM(config: EditorConfig): HTMLElement; updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean; canBeEmpty(): boolean; isCardLike(): boolean; isInline(): boolean; canIndent(): boolean; canInsertTextBefore(): boolean; canInsertTextAfter(): boolean; } export declare class PlaceholderBlockNode extends ElementNode { static getType(): string; static clone(node: PlaceholderBlockNode): PlaceholderBlockNode; static importJSON(serializedNode: SerializedPlaceholderNode): PlaceholderBlockNode; createDOM(config: EditorConfig): HTMLElement; updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean; canBeEmpty(): boolean; isCardLike(): boolean; isInline(): boolean; canIndent(): boolean; canInsertTextBefore(): boolean; canInsertTextAfter(): boolean; } export declare function $createPlaceholderNode(): PlaceholderNode; export declare function $createPlaceholderBlockNode(): PlaceholderBlockNode;