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.

42 lines (41 loc) 1.67 kB
import { DOMConversionMap, EditorConfig, LexicalNode, NodeKey } from 'lexical'; import { BaseImageNode, ImagePayload, SerializedImageNode } from './basie-image-node'; export declare class BlockImageNode extends BaseImageNode { private static _decorate; static setDecorate(decorate: (node: BlockImageNode) => any): void; static getType(): string; private __loading; private __status; private __message; private __extra; get isLoading(): boolean; get status(): 'uploaded' | 'loading' | 'error'; get message(): string | null; get src(): string; get altText(): string; get maxWidth(): number; get width(): number | string; get height(): number | string; constructor(opt: { altText: string; height?: 'inherit' | number; key?: NodeKey; maxWidth: number; src: string; status?: 'uploaded' | 'loading' | 'error'; width?: 'inherit' | number; }); isInline(): boolean; setMaxWidth(maxWidth: number): void; setWidth(width: number): void; setStatus(status: 'uploaded' | 'loading' | 'error'): void; setUploaded(url: string): void; setError(message: string): void; static clone(node: BlockImageNode): BlockImageNode; static importJSON(serializedNode: SerializedImageNode): BlockImageNode; static importDOM(): DOMConversionMap | null; decorate(): any; createDOM(config: EditorConfig): HTMLElement; } export declare function $createBlockImageNode({ altText, height, maxWidth, src, width, key, status, }: ImagePayload): BlockImageNode; export declare function $isBlockImageNode(node: LexicalNode): node is BlockImageNode;