+type PublicSidebar_d_SidebarSpec = SidebarSpec;
+type PublicSidebar_d_SidebarInstanceApi = SidebarInstanceApi;
+declare namespace PublicSidebar_d {
+ export { PublicSidebar_d_SidebarSpec as SidebarSpec, PublicSidebar_d_SidebarInstanceApi as SidebarInstanceApi, };
+}
+type PublicToolbar_d_ToolbarButtonSpec = ToolbarButtonSpec;
+type PublicToolbar_d_ToolbarButtonInstanceApi = ToolbarButtonInstanceApi;
+type PublicToolbar_d_ToolbarSplitButtonSpec = ToolbarSplitButtonSpec;
+type PublicToolbar_d_ToolbarSplitButtonInstanceApi = ToolbarSplitButtonInstanceApi;
+type PublicToolbar_d_ToolbarMenuButtonSpec = ToolbarMenuButtonSpec;
+type PublicToolbar_d_ToolbarMenuButtonInstanceApi = ToolbarMenuButtonInstanceApi;
+type PublicToolbar_d_ToolbarToggleButtonSpec = ToolbarToggleButtonSpec;
+type PublicToolbar_d_ToolbarToggleButtonInstanceApi = ToolbarToggleButtonInstanceApi;
+type PublicToolbar_d_GroupToolbarButtonSpec = GroupToolbarButtonSpec;
+type PublicToolbar_d_GroupToolbarButtonInstanceApi = GroupToolbarButtonInstanceApi;
+declare namespace PublicToolbar_d {
+ export { PublicToolbar_d_ToolbarButtonSpec as ToolbarButtonSpec, PublicToolbar_d_ToolbarButtonInstanceApi as ToolbarButtonInstanceApi, PublicToolbar_d_ToolbarSplitButtonSpec as ToolbarSplitButtonSpec, PublicToolbar_d_ToolbarSplitButtonInstanceApi as ToolbarSplitButtonInstanceApi, PublicToolbar_d_ToolbarMenuButtonSpec as ToolbarMenuButtonSpec, PublicToolbar_d_ToolbarMenuButtonInstanceApi as ToolbarMenuButtonInstanceApi, PublicToolbar_d_ToolbarToggleButtonSpec as ToolbarToggleButtonSpec, PublicToolbar_d_ToolbarToggleButtonInstanceApi as ToolbarToggleButtonInstanceApi, PublicToolbar_d_GroupToolbarButtonSpec as GroupToolbarButtonSpec, PublicToolbar_d_GroupToolbarButtonInstanceApi as GroupToolbarButtonInstanceApi, };
+}
+interface ViewButtonApi {
+ setIcon: (newIcon: string) => void;
+}
+interface ViewToggleButtonApi extends ViewButtonApi {
+ isActive: () => boolean;
+ setActive: (state: boolean) => void;
+}
+interface BaseButtonSpec<Api extends ViewButtonApi> {
+ text?: string;
+ icon?: string;
+ tooltip?: string;
+ buttonType?: 'primary' | 'secondary';
+ borderless?: boolean;
+ onAction: (api: Api) => void;
+}
+interface ViewNormalButtonSpec extends BaseButtonSpec<ViewButtonApi> {
+ text: string;
+ type: 'button';
+}
+interface ViewToggleButtonSpec extends BaseButtonSpec<ViewToggleButtonApi> {
+ type: 'togglebutton';
+ active?: boolean;
+ onAction: (api: ViewToggleButtonApi) => void;
+}
+interface ViewButtonsGroupSpec {
+ type: 'group';
+ buttons: Array<ViewNormalButtonSpec | ViewToggleButtonSpec>;
+}
+type ViewButtonSpec = ViewNormalButtonSpec | ViewToggleButtonSpec | ViewButtonsGroupSpec;
+interface ViewInstanceApi {
+ getContainer: () => HTMLElement;
+}
+interface ViewSpec {
+ buttons?: ViewButtonSpec[];
+ onShow: (api: ViewInstanceApi) => void;
+ onHide: (api: ViewInstanceApi) => void;
+}
+type PublicView_d_ViewSpec = ViewSpec;
+type PublicView_d_ViewInstanceApi = ViewInstanceApi;
+declare namespace PublicView_d {
+ export { PublicView_d_ViewSpec as ViewSpec, PublicView_d_ViewInstanceApi as ViewInstanceApi, };
+}
+interface Registry$1 {
+ addButton: (name: string, spec: ToolbarButtonSpec) => void;
+ addGroupToolbarButton: (name: string, spec: GroupToolbarButtonSpec) => void;
+ addToggleButton: (name: string, spec: ToolbarToggleButtonSpec) => void;
+ addMenuButton: (name: string, spec: ToolbarMenuButtonSpec) => void;
+ addSplitButton: (name: string, spec: ToolbarSplitButtonSpec) => void;
+ addMenuItem: (name: string, spec: MenuItemSpec) => void;
+ addNestedMenuItem: (name: string, spec: NestedMenuItemSpec) => void;
+ addToggleMenuItem: (name: string, spec: ToggleMenuItemSpec) => void;
+ addContextMenu: (name: string, spec: ContextMenuApi) => void;
+ addContextToolbar: (name: string, spec: ContextToolbarSpec) => void;
+ addContextForm: (name: string, spec: ContextFormSpec) => void;
+ addIcon: (name: string, svgData: string) => void;
+ addAutocompleter: (name: string, spec: AutocompleterSpec) => void;
+ addSidebar: (name: string, spec: SidebarSpec) => void;
+ addView: (name: string, spec: ViewSpec) => void;
+ getAll: () => {
+ buttons: Record<string, ToolbarButtonSpec | GroupToolbarButtonSpec | ToolbarMenuButtonSpec | ToolbarSplitButtonSpec | ToolbarToggleButtonSpec>;
+ menuItems: Record<string, MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec>;
+ popups: Record<string, AutocompleterSpec>;
+ contextMenus: Record<string, ContextMenuApi>;
+ contextToolbars: Record<string, ContextToolbarSpec | ContextFormSpec>;
+ icons: Record<string, string>;
+ sidebars: Record<string, SidebarSpec>;
+ views: Record<string, ViewSpec>;
+ };
+}
+interface AutocompleteLookupData {
+ readonly matchText: string;
+ readonly items: AutocompleterContents[];
+ readonly columns: ColumnTypes;
+ readonly onAction: (autoApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
+ readonly highlightOn: string[];
+}
+interface AutocompleterEventArgs {
+ readonly lookupData: AutocompleteLookupData[];
+}
+interface RangeLikeObject {
+ startContainer: Node;
+ startOffset: number;
+ endContainer: Node;
+ endOffset: number;
+}
+type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
+type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
+type Format = ApplyFormat | RemoveFormat;
+type Formats = Record<string, Format | Format[]>;
+type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string | null);
+type FormatVars = Record<string, string | null>;
+interface BaseFormat<T> {
+ ceFalseOverride?: boolean;
+ classes?: string | string[];
+ collapsed?: boolean;
+ exact?: boolean;
+ expand?: boolean;
+ links?: boolean;
+ mixed?: boolean;
+ block_expand?: boolean;
+ onmatch?: (node: Element, fmt: T, itemName: string) => boolean;
+ remove?: 'none' | 'empty' | 'all';
+ remove_similar?: boolean;
+ split?: boolean;
+ deep?: boolean;
+ preserve_attributes?: string[];
+}
+interface Block {
+ block: string;
+ list_block?: string;
+ wrapper?: boolean;
+}
+interface Inline {
+ inline: string;
+}
+interface Selector {
+ selector: string;
+ inherit?: boolean;
+}
+interface CommonFormat<T> extends BaseFormat<T> {
+ attributes?: Record<string, FormatAttrOrStyleValue>;
+ styles?: Record<string, FormatAttrOrStyleValue>;
+ toggle?: boolean;
+ preview?: string | false;
+ onformat?: (elm: Element, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject | null) => void;
+ clear_child_styles?: boolean;
+ merge_siblings?: boolean;
+ merge_with_parents?: boolean;
+}
+interface BlockFormat extends Block, CommonFormat<BlockFormat> {
+}
+interface InlineFormat extends Inline, CommonFormat<InlineFormat> {
+}
+interface SelectorFormat extends Selector, CommonFormat<SelectorFormat> {
+}
+interface CommonRemoveFormat<T> extends BaseFormat<T> {
+ attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
+ styles?: string[] | Record<string, FormatAttrOrStyleValue>;
+}
+interface RemoveBlockFormat extends Block, CommonRemoveFormat<RemoveBlockFormat> {
+}
+interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineFormat> {
+}
+interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
+}
+interface Filter<C extends Function> {
+ name: string;
+ callbacks: C[];
+}
+interface ParserArgs {
+ getInner?: boolean | number;
+ forced_root_block?: boolean | string;
+ context?: string;
+ isRootContent?: boolean;
+ format?: string;
+ invalid?: boolean;
+ no_events?: boolean;
+ [key: string]: any;
+}
+type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
+interface ParserFilter extends Filter<ParserFilterCallback> {
+}
+interface DomParserSettings {
+ allow_html_data_urls?: boolean;
+ allow_svg_data_urls?: boolean;
+ allow_conditional_comments?: boolean;
+ allow_html_in_named_anchor?: boolean;
+ allow_script_urls?: boolean;
+ allow_unsafe_link_target?: boolean;
+ blob_cache?: BlobCache;
+ convert_fonts_to_spans?: boolean;
+ convert_unsafe_embeds?: boolean;
+ document?: Document;
+ fix_list_elements?: boolean;
+ font_size_legacy_values?: string;
+ forced_root_block?: boolean | string;
+ forced_root_block_attrs?: Record<string, string>;
+ inline_styles?: boolean;
+ pad_empty_with_br?: boolean;
+ preserve_cdata?: boolean;
+ remove_trailing_brs?: boolean;
+ root_name?: string;
+ sandbox_iframes?: boolean;
+ sanitize?: boolean;
+ validate?: boolean;
+}
+interface DomParser {
+ schema: Schema;
+ addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
+ getAttributeFilters: () => ParserFilter[];
+ removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
+ addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
+ getNodeFilters: () => ParserFilter[];
+ removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
+ parse: (html: string, args?: ParserArgs) => AstNode;
+}
+interface StyleSheetLoaderSettings {
+ maxLoadTime?: number;
+ contentCssCors?: boolean;
+ referrerPolicy?: ReferrerPolicy;
+}
+interface StyleSheetLoader {
+ load: (url: string) => Promise<void>;
+ loadRawCss: (key: string, css: string) => void;
+ loadAll: (urls: string[]) => Promise<string[]>;
+ unload: (url: string) => void;
+ unloadRawCss: (key: string) => void;
+ unloadAll: (urls: string[]) => void;
+ _setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
+ _setContentCssCors: (contentCssCors: boolean) => void;
+}
+type Registry = Registry$1;
+interface EditorUiApi {
+ show: () => void;
+ hide: () => void;
+ setEnabled: (state: boolean) => void;
+ isEnabled: () => boolean;
+}
+interface EditorUi extends EditorUiApi {
+ registry: Registry;
+ styleSheetLoader: StyleSheetLoader;
+}
+type Ui_d_Registry = Registry;
+type Ui_d_EditorUiApi = EditorUiApi;
+type Ui_d_EditorUi = EditorUi;
+declare namespace Ui_d {
+ export { Ui_d_Registry as Registry, PublicDialog_d as Dialog, PublicInlineContent_d as InlineContent, PublicMenu_d as Menu, PublicView_d as View, PublicSidebar_d as Sidebar, PublicToolbar_d as Toolbar, Ui_d_EditorUiApi as EditorUiApi, Ui_d_EditorUi as EditorUi, };
+}
+interface WindowParams {
+ readonly inline?: 'cursor' | 'toolbar' | 'bottom';
+ readonly ariaAttrs?: boolean;
+ readonly persistent?: boolean;
+}
+type InstanceApi<T extends DialogData> = UrlDialogInstanceApi | DialogInstanceApi<T>;
+interface WindowManagerImpl {
+ open: <T extends DialogData>(config: DialogSpec<T>, params: WindowParams | undefined, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
+ openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
+ alert: (message: string, callback: () => void) => void;
+ confirm: (message: string, callback: (state: boolean) => void) => void;
+ close: (dialog: InstanceApi<any>) => void;
+}
+interface WindowManager {
+ open: <T extends DialogData>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
+ openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
+ alert: (message: string, callback?: () => void, scope?: any) => void;
+ confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
+ close: () => void;
+}
+interface ExecCommandEvent {
+ command: string;
+ ui: boolean;
+ value?: any;
+}
+interface BeforeGetContentEvent extends GetContentArgs {
+ selection?: boolean;
+}
+interface GetContentEvent extends BeforeGetContentEvent {
+ content: string;
+}
+interface BeforeSetContentEvent extends SetContentArgs {
+ content: string;
+ selection?: boolean;
+}
+interface SetContentEvent extends BeforeSetContentEvent {
+ content: string;
+}
+interface SaveContentEvent extends GetContentEvent {
+ save: boolean;
+}
+interface NewBlockEvent {
+ newBlock: Element;
+}
+interface NodeChangeEvent {
+ element: Element;
+ parents: Node[];
+ selectionChange?: boolean;
+ initial?: boolean;
+}
+interface FormatEvent {
+ format: string;
+ vars?: FormatVars;
+ node?: Node | RangeLikeObject | null;
+}
+interface ObjectResizeEvent {
+ target: HTMLElement;
+ width: number;
+ height: number;
+ origin: string;
+}
+interface ObjectSelectedEvent {
+ target: Node;
+ targetClone?: Node;
+}
+interface ScrollIntoViewEvent {
+ elm: HTMLElement;
+ alignToTop: boolean | undefined;
+}
+interface SetSelectionRangeEvent {
+ range: Range;
+ forward: boolean | undefined;
+}
+interface ShowCaretEvent {
+ target: Node;
+ direction: number;
+ before: boolean;
+}
+interface SwitchModeEvent {
+ mode: string;
+}
+interface ChangeEvent {
+ level: UndoLevel;
+ lastLevel: UndoLevel | undefined;
+}
+interface AddUndoEvent extends ChangeEvent {
+ originalEvent: Event | undefined;
+}
+interface UndoRedoEvent {
+ level: UndoLevel;
+}
+interface WindowEvent<T extends DialogData> {
+ dialog: InstanceApi<T>;
+}
+interface ProgressStateEvent {
+ state: boolean;
+ time?: number;
+}
+interface AfterProgressStateEvent {
+ state: boolean;
+}
+interface PlaceholderToggleEvent {
+ state: boolean;
+}
+interface LoadErrorEvent {
+ message: string;
+}
+interface PreProcessEvent extends ParserArgs {
+ node: Element;
+}
+interface PostProcessEvent extends ParserArgs {
+ content: string;
+}
+interface PastePlainTextToggleEvent {
+ state: boolean;
+}
+interface PastePreProcessEvent {
+ content: string;
+ readonly internal: boolean;
+}
+interface PastePostProcessEvent {
+ node: HTMLElement;
+ readonly internal: boolean;
+}
+interface EditableRootStateChangeEvent {
+ state: boolean;
+}
+interface NewTableRowEvent {
+ node: HTMLTableRowElement;
+}
+interface NewTableCellEvent {
+ node: HTMLTableCellElement;
+}
+interface TableEventData {
+ readonly structure: boolean;
+ readonly style: boolean;
+}
+interface TableModifiedEvent extends TableEventData {
+ readonly table: HTMLTableElement;
+}
+interface BeforeOpenNotificationEvent {
+ notification: NotificationSpec;
+}
+interface OpenNotificationEvent {
+ notification: NotificationApi;
+}
+interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
+ 'activate': {
+ relatedTarget: Editor | null;
+ };
+ 'deactivate': {
+ relatedTarget: Editor;
+ };
+ 'focus': {
+ blurredEditor: Editor | null;
+ };
+ 'blur': {
+ focusedEditor: Editor | null;
+ };
+ 'resize': UIEvent;
+ 'scroll': UIEvent;
+ 'input': InputEvent;
+ 'beforeinput': InputEvent;
+ 'detach': {};
+ 'remove': {};
+ 'init': {};
+ 'ScrollIntoView': ScrollIntoViewEvent;
+ 'AfterScrollIntoView': ScrollIntoViewEvent;
+ 'ObjectResized': ObjectResizeEvent;
+ 'ObjectResizeStart': ObjectResizeEvent;
+ 'SwitchMode': SwitchModeEvent;
+ 'ScrollWindow': Event;
+ 'ResizeWindow': UIEvent;
+ 'SkinLoaded': {};
+ 'SkinLoadError': LoadErrorEvent;
+ 'PluginLoadError': LoadErrorEvent;
+ 'ModelLoadError': LoadErrorEvent;
+ 'IconsLoadError': LoadErrorEvent;
+ 'ThemeLoadError': LoadErrorEvent;
+ 'LanguageLoadError': LoadErrorEvent;
+ 'BeforeExecCommand': ExecCommandEvent;
+ 'ExecCommand': ExecCommandEvent;
+ 'NodeChange': NodeChangeEvent;
+ 'FormatApply': FormatEvent;
+ 'FormatRemove': FormatEvent;
+ 'ShowCaret': ShowCaretEvent;
+ 'SelectionChange': {};
+ 'ObjectSelected': ObjectSelectedEvent;
+ 'BeforeObjectSelected': ObjectSelectedEvent;
+ 'GetSelectionRange': {
+ range: Range;
+ };
+ 'SetSelectionRange': SetSelectionRangeEvent;
+ 'AfterSetSelectionRange': SetSelectionRangeEvent;
+ 'BeforeGetContent': BeforeGetContentEvent;
+ 'GetContent': GetContentEvent;
+ 'BeforeSetContent': BeforeSetContentEvent;
+ 'SetContent': SetContentEvent;
+ 'SaveContent': SaveContentEvent;
+ 'RawSaveContent': SaveContentEvent;
+ 'LoadContent': {
+ load: boolean;
+ element: HTMLElement;
+ };
+ 'PreviewFormats': {};
+ 'AfterPreviewFormats': {};
+ 'ScriptsLoaded': {};
+ 'PreInit': {};
+ 'PostRender': {};
+ 'NewBlock': NewBlockEvent;
+ 'ClearUndos': {};
+ 'TypingUndo': {};
+ 'Redo': UndoRedoEvent;
+ 'Undo': UndoRedoEvent;
+ 'BeforeAddUndo': AddUndoEvent;
+ 'AddUndo': AddUndoEvent;
+ 'change': ChangeEvent;
+ 'CloseWindow': WindowEvent<any>;
+ 'OpenWindow': WindowEvent<any>;
+ 'ProgressState': ProgressStateEvent;
+ 'AfterProgressState': AfterProgressStateEvent;
+ 'PlaceholderToggle': PlaceholderToggleEvent;
+ 'tap': TouchEvent;
+ 'longpress': TouchEvent;
+ 'longpresscancel': {};
+ 'PreProcess': PreProcessEvent;
+ 'PostProcess': PostProcessEvent;
+ 'AutocompleterStart': AutocompleterEventArgs;
+ 'AutocompleterUpdate': AutocompleterEventArgs;
+ 'AutocompleterEnd': {};
+ 'PastePlainTextToggle': PastePlainTextToggleEvent;
+ 'PastePreProcess': PastePreProcessEvent;
+ 'PastePostProcess': PastePostProcessEvent;
+ 'TableModified': TableModifiedEvent;
+ 'NewRow': NewTableRowEvent;
+ 'NewCell': NewTableCellEvent;
+ 'SetAttrib': SetAttribEvent;
+ 'hide': {};
+ 'show': {};
+ 'dirty': {};
+ 'BeforeOpenNotification': BeforeOpenNotificationEvent;
+ 'OpenNotification': OpenNotificationEvent;
+}
+interface EditorManagerEventMap {
+ 'AddEditor': {
+ editor: Editor;
+ };
+ 'RemoveEditor': {
+ editor: Editor;
+ };
+ 'BeforeUnload': {
+ returnValue: any;
+ };