import type { RefObject, MutableRefObject } from 'react'; import type { Editor as TiptapEditor } from '@tiptap/core'; import { useTheme } from '@pega/cosmos-react-core'; import type { CustomComponent, EditorProps } from '../Editor.types'; interface UseIframeSetupParams { iframeRef: RefObject; theme: ReturnType; styleSheetTarget?: HTMLElement | ShadowRoot; customElements: CustomComponent[]; placeholder?: string; defaultValue?: string; disabled?: boolean; readOnly?: boolean; onChange?: (editor: TiptapEditor) => void; onKeyDown?: (event?: KeyboardEvent) => void; onFocus?: () => void; onBlur?: () => void; onInit?: (editor: TiptapEditor) => void; spellcheck?: boolean; initOptions?: EditorProps['initOptions']; onImageAdded?: (image: File, id: string, altText?: string) => void; imagesEnabled: boolean; linksEnabled: boolean; colorsEnabled: boolean; imageInsertionMode: 'file' | 'url' | 'all'; pastedImages: MutableRefObject; editorId: string; required?: boolean; setTiptapEditor: (editor: TiptapEditor) => void; setFocused: (focused: boolean) => void; autoResize?: boolean; onTabOut?: () => void; onFocusTableMenu?: () => void; onFocusPreviousCellMenu?: () => void; secure?: boolean; preserveTableStyles?: boolean; } export interface IframeEditorHandle { focus: () => void; getPlainText: () => string; getRichText: () => string; getHtml: () => string; clear: () => void; insertText: (text: string) => void; setCursorLocationToStart: () => void; insertHtml: (html: string, overwrite?: boolean) => void; getEditor: () => TiptapEditor | null; setEditable: (editable: boolean) => void; } export type IframeEditorRef = MutableRefObject; interface UseIframeSetupReturn { iframeEditorRef: IframeEditorRef; } export default function useIframeSetup({ iframeRef, theme, styleSheetTarget, customElements, placeholder, defaultValue, disabled, readOnly, onChange, onKeyDown, onFocus, onBlur, onInit, spellcheck, initOptions, onImageAdded, imagesEnabled, linksEnabled, colorsEnabled, imageInsertionMode, pastedImages, editorId, required, setTiptapEditor, setFocused, autoResize, onTabOut, onFocusTableMenu, onFocusPreviousCellMenu, secure, preserveTableStyles }: UseIframeSetupParams): UseIframeSetupReturn; export {}; //# sourceMappingURL=useIframeSetup.d.ts.map