UNPKG

@gdyfe/ssml

Version:
25 lines (24 loc) 929 B
import type { IEditorConfig } from '@wangeditor/editor'; type Animation = { zoom: boolean; grayscale: boolean; }; type PartialKey = 'animation' | 'editorConfig' | 'toolbarConfig'; type PartialProps<T, K extends keyof T> = { [P in K]?: Partial<T[P]>; }; export type PartialSSMLEditorConfig = Partial<Omit<SSMLEditorConfig, PartialKey>> & PartialProps<SSMLEditorConfig, PartialKey>; export interface SSMLEditorConfig { animation: Animation; editorConfig: Partial<IEditorConfig> & { saveHtml?: (htmlGetter: () => string) => Promise<boolean>; autoSave: boolean; autoSaveWait: number; }; toolbarConfig: [string[], string[]]; handleWarn: (message: string) => void; handleError: (error: unknown) => void; } export declare function setConfig(key: symbol, partConfig?: PartialSSMLEditorConfig): void; export declare function getConfig(key: symbol): SSMLEditorConfig; export {};