/**
* DevExtreme (ui/html_editor.d.ts)
* Version: 21.1.0 (build 21016-0316)
* Build date: Sat Jan 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
    dxElement
} from '../core/element';

import {
    template
} from '../core/templates/template';

import DataSource, {
    DataSourceOptions
} from '../data/data_source';

import {
    event
} from '../events/index';

import Editor, {
    EditorOptions
} from './editor/editor';

import {
    dxToolbarItem
} from './toolbar';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxHtmlEditorOptions extends EditorOptions<dxHtmlEditor> {
    /**
     */
    customizeModules?: ((config: any) => any);
    /**
     */
    focusStateEnabled?: boolean;
    /**
     */
    mediaResizing?: dxHtmlEditorMediaResizing;
    /**
     */
    mentions?: Array<dxHtmlEditorMention>;
    /**
     */
    name?: string;
    /**
     */
    onFocusIn?: ((e: { component?: dxHtmlEditor, element?: dxElement, model?: any, event?: event }) => any);
    /**
     */
    onFocusOut?: ((e: { component?: dxHtmlEditor, element?: dxElement, model?: any, event?: event }) => any);
    /**
     */
    placeholder?: string;
    /**
     */
    toolbar?: dxHtmlEditorToolbar;
    /**
     */
    valueType?: 'html' | 'markdown';
    /**
     */
    variables?: dxHtmlEditorVariables;
}
/**
 */
export default class dxHtmlEditor extends Editor {
    constructor(element: Element, options?: dxHtmlEditorOptions)
    constructor(element: JQuery, options?: dxHtmlEditorOptions)
    /**
     */
    clearHistory(): void;
    /**
     */
    delete(index: number, length: number): void;
    /**
     */
    format(formatName: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'size' | 'strike' | 'script' | 'underline' | 'blockquote' | 'header' | 'indent' | 'list' | 'align' | 'code-block' | string, formatValue: any): void;
    /**
     */
    formatLine(index: number, length: number, formatName: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'size' | 'strike' | 'script' | 'underline' | 'blockquote' | 'header' | 'indent' | 'list' | 'align' | 'code-block' | string, formatValue: any): void;
    /**
     */
    formatLine(index: number, length: number, formats: any): void;
    /**
     */
    formatText(index: number, length: number, formatName: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'size' | 'strike' | 'script' | 'underline' | 'blockquote' | 'header' | 'indent' | 'list' | 'align' | 'code-block' | string, formatValue: any): void;
    /**
     */
    formatText(index: number, length: number, formats: any): void;
    /**
     */
    get(componentPath: string): any;
    /**
     */
    getFormat(index: number, length: number): any;
    /**
     */
    getLength(): number;
    /**
     */
    getModule(moduleName: string): any;
    /**
     */
    getQuillInstance(): any;
    /**
     */
    getSelection(): any;
    /**
     */
    insertEmbed(index: number, type: string, config: any): void;
    /**
     */
    insertText(index: number, text: string, formats: any): void;
    /**
     */
    redo(): void;
    /**
     */
    register(modules: any): void;
    /**
     */
    removeFormat(index: number, length: number): void;
    /**
     */
    setSelection(index: number, length: number): void;
    /**
     */
    undo(): void;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxHtmlEditorMediaResizing {
    /**
     */
    allowedTargets?: Array<string>;
    /**
     */
    enabled?: boolean;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxHtmlEditorMention {
    /**
     */
    dataSource?: Array<string> | DataSource | DataSourceOptions;
    /**
     */
    displayExpr?: string | ((item: any) => string);
    /**
     */
    itemTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
    /**
     */
    marker?: string;
    /**
     */
    minSearchLength?: number;
    /**
     */
    searchExpr?: string | Function | Array<string | Function>;
    /**
     */
    searchTimeout?: number;
    /**
     */
    template?: template | ((mentionData: { marker?: string, id?: string | number, value?: any }, contentElement: dxElement) => string | Element | JQuery);
    /**
     */
    valueExpr?: string | Function;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxHtmlEditorToolbar {
    /**
     */
    container?: string | Element | JQuery;
    /**
     */
    items?: Array<dxHtmlEditorToolbarItem | 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'image' | 'size' | 'strike' | 'subscript' | 'superscript' | 'underline' | 'blockquote' | 'header' | 'increaseIndent' | 'decreaseIndent' | 'orderedList' | 'bulletList' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'codeBlock' | 'variable' | 'separator' | 'undo' | 'redo' | 'clear' | 'insertTable' | 'insertRowAbove' | 'insertRowBelow' | 'insertColumnLeft' | 'insertColumnRight' | 'deleteColumn' | 'deleteRow' | 'deleteTable'>;
    /**
     */
    multiline?: boolean;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxHtmlEditorToolbarItem extends dxToolbarItem {
    /**
     */
    formatName?: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'image' | 'size' | 'strike' | 'subscript' | 'superscript' | 'underline' | 'blockquote' | 'header' | 'increaseIndent' | 'decreaseIndent' | 'orderedList' | 'bulletList' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'codeBlock' | 'variable' | 'separator' | 'undo' | 'redo' | 'clear' | 'insertTable' | 'insertRowAbove' | 'insertRowBelow' | 'insertColumnLeft' | 'insertColumnRight' | 'deleteColumn' | 'deleteRow' | 'deleteTable' | string;
    /**
     */
    formatValues?: Array<string | number | boolean>;
    /**
     */
    location?: 'after' | 'before' | 'center';
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxHtmlEditorVariables {
    /**
     */
    dataSource?: string | Array<string> | DataSource | DataSourceOptions;
    /**
     */
    escapeChar?: string | Array<string>;
}

declare global {
interface JQuery {
    dxHtmlEditor(): JQuery;
    dxHtmlEditor(options: "instance"): dxHtmlEditor;
    dxHtmlEditor(options: string): any;
    dxHtmlEditor(options: string, ...params: any[]): any;
    dxHtmlEditor(options: dxHtmlEditorOptions): JQuery;
}
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type Options = dxHtmlEditorOptions;

/** @deprecated use Options instead */
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type IOptions = dxHtmlEditorOptions;
