/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net */ /** * @module types */ import type { Buttons, ButtonsGroup, ButtonsOption, Controls, IControlType, IProgressBar, IToolbarCollection } from "./toolbar"; import type { CanUndef, IComponent, IContainer, IDictionary, Nullable } from "./types"; import type { Attributes, ICreate } from "./create"; import type { IAsyncStorage, IAsyncStorageOptions, IStorage } from "./storage"; import type { IUIButtonState } from "./ui"; import type { IEventEmitter } from "./events"; import type { IPluginButton } from "./plugin"; import type { IElms, IMods } from "./traits"; import type { IMessages } from "./messages"; interface ILanguageOptions { language?: string; debugLanguage?: boolean; i18n?: IDictionary> | false; } interface IToolbarOptions { toolbar?: boolean | string | HTMLElement; readonly theme?: string; readonly toolbarButtonSize?: IUIButtonState['size']; readonly textIcons?: boolean | ((key: string) => boolean); readonly extraButtons?: Buttons; readonly removeButtons?: string[]; readonly extraIcons?: IDictionary; readonly buttons?: ButtonsOption; readonly showTooltip?: boolean; readonly showTooltipDelay?: number; readonly useNativeTooltip?: boolean; readonly direction?: string; } type NodeFunction = (elm: HTMLElement) => void; interface IViewOptions extends ILanguageOptions, IToolbarOptions { /** * Use cache for heavy methods */ cache?: boolean; /** * Configure the provider that backs {@link IViewBased.asyncStorage}. * By default it uses persistent `IndexedDB` (with an in-memory fallback); * set `defaultProvider` to `'local'`, `'memory'` or a custom * {@link IAsyncStorage} implementation to override it. */ asyncStorage?: IAsyncStorageOptions; getIcon?: (name: string, clearName: string) => CanUndef; headerButtons?: string | Array; readonly basePath?: string; /** * Plugin autoloader should load minified version of the file */ readonly minified?: boolean; theme?: string; defaultTimeout?: number; disabled?: boolean; readonly?: boolean; iframe?: boolean; direction?: 'ltr' | 'rtl' | ''; namespace?: string; activeButtonsInReadOnly?: string[]; allowTabNavigation?: boolean; zIndex?: number | string; fullsize?: boolean; globalFullSize?: boolean; controls?: Controls; createAttributes?: IDictionary; events?: IDictionary<(...args: any[]) => any>; shadowRoot?: Nullable; /** * CSP nonce applied to every `