import { RichTextEditor } from '../../rich-text-editor'; import { Button } from '../../../button/button'; import { RteHtmlParser, RteHtmlSerializer } from '../../definition'; import { Menu } from '../../../menu/menu'; import { MenuItem } from '../../../menu-item/menu-item'; import { Select } from '../../../select/select'; import { ListboxOption } from '../../../option/option'; import { RteConfig } from '../config'; import { RteFeature } from '../feature'; import { TextField } from '../../../text-field/text-field'; import { Popover } from '../../popover'; import { RteFragment } from '../document'; import { RteInstanceOptions } from '../instance'; export interface SlottableRequest { name: string; slotName: string; data: unknown; } export declare function setup(features: RteFeature[], initialContent?: RteFragment, options?: (config: RteConfig) => RteInstanceOptions): Promise<{ instance: import('../instance').RteInstance; element: RichTextEditor; view: import('prosemirror-view').EditorView; config: RteConfig; htmlParser: RteHtmlParser; htmlSerializer: RteHtmlSerializer; getHtml: () => string; setHtml: (html: string) => void; keydown: (key: string, options?: { ctrl?: boolean; cmd?: boolean; alt?: boolean; shift?: boolean; }) => void; selectAll: () => void; undo: () => void; getPos: (textWithCursor: string) => number; placeCursor: (textWithCursor: string) => void; typeTextAtCursor: (text: string) => Promise; docStr: () => string; placeholder: () => HTMLElement | null; popovers: Element; toolbar: Element; toolbarButton: (ariaLabel: string) => Button; button: (root: HTMLElement, label: string) => Button; textField: (root: HTMLElement, label: string) => TextField; click: (el: Button | MenuItem) => Promise; input: (el: TextField, value: string) => Promise; isActive: (button: Button) => boolean; openMenu: () => Menu; menuItem: (menu: Menu, text: string) => MenuItem; isChecked: (item: MenuItem) => boolean; selectText: (startWithSelection: string, endWithSection?: string) => void; selectImage: (altText: string) => void; simulateImageLoaded: (altText: string, naturalWidth: number, naturalHeight: number) => void; getImageWrapper: () => HTMLDivElement | null; getImage: (altText: string) => HTMLImageElement | null; toolbarSelect: (ariaLabel: string) => Select; option: (select: Select, text: string) => ListboxOption; openPopover: () => Popover | undefined; pasteFiles: (items: DataTransferItem[]) => void; pasteHtml: (html: string) => void; copy: () => DataTransfer; dropFiles: (atPos: number, items: DataTransferItem[]) => void; dropHtml: (atPos: number, html: string) => void; startDrag: (atPos: number) => DataTransfer; dispatchDragEvent: (type: string, init?: DragEventInit, target?: HTMLElement) => DragEvent; slottableRequests: SlottableRequest[]; }>;