import { Node } from 'prosemirror-model'; import { Command, EditorState, Plugin } from 'prosemirror-state'; import { RteFeatureImpl, SchemaContribution } from '../feature'; import { RteInstanceImpl } from '../instance'; type SizeOption = 'small' | 'fit' | 'original'; type ContentDestroyedHandler = () => unknown; export type ResolvedUrl = string | null | { type: 'placeholder'; create?: (slotName: string) => ContentDestroyedHandler | undefined; }; type ResolvedUrlGenerator = AsyncGenerator; export interface RteInlineImageConfig { resolveUrl?: (imageUrl: string) => ResolvedUrl | ResolvedUrlGenerator; serializeUrlToHtml?: (imageUrl: string) => string | null; parseUrlFromHtml?: (src: string) => string | null; } export declare class RteInlineImageFeatureImpl extends RteFeatureImpl { protected readonly config: RteInlineImageConfig; name: string; constructor(config?: RteInlineImageConfig); getStyles(): { priority: number; featureName: string; value: string; }[]; getSchema(): SchemaContribution[]; getPlugins(rte: RteInstanceImpl): { priority: number; featureName: string; value: Plugin; }[]; calculateSmallWidth(naturalWidth: number): string; getSelectedInlineImage(state: EditorState): { pos: number; node: Node; } | null; setSelectedImageSize(size: SizeOption): Command; getSelectedImageSize(state: EditorState): SizeOption | null; } export declare const RteInlineImageFeature: { new (config?: RteInlineImageConfig | undefined): {}; }; export {};