import { StructureSchema } from '@ephox/boulder'; import type { Optional, Result } from '@ephox/katamari'; import { type FormComponent, type FormComponentSpec } from './FormComponent'; export interface CustomEditorInit { setValue: (value: string) => void; getValue: () => string; destroy: () => void; } export type CustomEditorInitFn = (elm: HTMLElement, settings: any) => Promise; interface CustomEditorOldSpec extends FormComponentSpec { type: 'customeditor'; tag?: string; init: (e: HTMLElement) => Promise; } interface CustomEditorNewSpec extends FormComponentSpec { type: 'customeditor'; tag?: string; scriptId: string; scriptUrl: string; onFocus?: (e: HTMLElement) => void; settings?: any; } export type CustomEditorSpec = CustomEditorOldSpec | CustomEditorNewSpec; export interface CustomEditorOld extends FormComponent { type: 'customeditor'; tag: string; init: (e: HTMLElement) => Promise; } export interface CustomEditorNew extends FormComponent { type: 'customeditor'; tag: string; scriptId: string; scriptUrl: string; onFocus: Optional<(e: HTMLElement) => void>; settings: any; } export type CustomEditor = CustomEditorOld | CustomEditorNew; export declare const customEditorSchema: import("@ephox/boulder").StructureProcessor; export declare const customEditorDataProcessor: import("@ephox/boulder").StructureProcessor; export declare const createCustomEditor: (spec: CustomEditorSpec) => Result>; export {}; //# sourceMappingURL=CustomEditor.d.ts.map