@lobehub/editor
Version:
A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.
21 lines (20 loc) • 693 B
TypeScript
import type { JSX } from 'react';
import { IEditorPluginConstructor } from "../../../types";
import { BlockImageNode } from '../node/block-image-node';
import { ImageNode } from '../node/image-node';
export interface ImagePluginOptions {
defaultBlockImage?: boolean;
handleRehost?: (url: string) => Promise<{
url: string;
}>;
handleUpload: (file: File) => Promise<{
url: string;
}>;
needRehost?: (url: string) => boolean;
renderImage: (node: ImageNode | BlockImageNode) => JSX.Element | null;
theme?: {
blockImage?: string;
image?: string;
};
}
export declare const ImagePlugin: IEditorPluginConstructor<ImagePluginOptions>;