import * as i0 from '@angular/core'; import { InjectionToken, AfterViewInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ModuleWithProviders } from '@angular/core'; import * as i1 from '@angular/common'; import { ControlValueAccessor, Validator } from '@angular/forms'; import { Observable } from 'rxjs'; type QuillToolbarConfig = Array; color?: string[]; background?: string[]; align?: string[]; script?: string; font?: string[]; size?: Array; }>>; interface QuillModules { [key: string]: any; clipboard?: { mathers?: any[]; matchVisual?: boolean; } | boolean; history?: { delay?: number; maxStack?: number; userOnly?: boolean; } | boolean; keyboard?: { bindings?: any; } | boolean; syntax?: boolean; table?: boolean; toolbar?: QuillToolbarConfig | string | { container?: string | string[] | QuillToolbarConfig; handlers?: { [key: string]: any; }; } | boolean; } type QuillFormat = 'object' | 'json' | 'html' | 'text'; interface QuillConfig { bounds?: HTMLElement | string; debug?: 'error' | 'warn' | 'log' | false; format?: QuillFormat; formats?: any; modules?: QuillModules; placeholder?: string; readOnly?: boolean; scrollingContainer?: HTMLElement | string | null; theme?: string; trackChanges?: 'user' | 'all'; } interface QuillDynamicConfig { /** path for scripts and css e.g. '/assets/quill/' */ path: string; } declare const QUILL_CONFIG_TOKEN: InjectionToken; declare const QUILL_DYNAMIC_CONFIG_TOKEN: InjectionToken; interface BetterTableModule { insertTable(rows: number, columns: number): void; } interface ToolbarItemConfig { name: string; label?: string; options?: any[]; dialogMessage?: string; } type EditorChangeContent = ContentChange & { event: 'text-change'; }; type EditorChangeSelection = SelectionChange & { event: 'selection-change'; }; interface Focus { editor: any; source: string; } interface Range { index: number; length: number; } interface ContentChange { content: any; delta: any; editor: any; html: string | null; oldDelta: any; source: string; text: string; } interface SelectionChange { editor: any; oldRange: Range | null; range: Range | null; source: string; } interface Blur { editor: any; source: string; } interface CustomOption { import: string; whitelist: any[]; } declare class QuillEditorComponent implements AfterViewInit, ControlValueAccessor, OnChanges, OnDestroy, Validator { quillEditor: any; editorElem: HTMLElement | undefined; content: any; protected loaded: boolean; id: string; format?: 'object' | 'html' | 'text' | 'json'; theme?: string; modules?: QuillModules; debug?: 'warn' | 'log' | 'error' | false; placeholder?: string; maxLength?: number; minLength?: number; formats?: string[] | null; customToolbarPosition: 'top' | 'bottom'; styles: any; scrollingContainer?: HTMLElement | string | null; bounds?: HTMLElement | string; customOptions: CustomOption[]; trackChanges?: 'user' | 'all'; hasImageFeature: boolean; onEditorCreated: EventEmitter; onContentChanged: EventEmitter; onSelectionChanged: EventEmitter; onFocus: EventEmitter<{ editor: any; source: string; }>; onBlur: EventEmitter<{ editor: any; source: string; }>; readOnly?: boolean; required: boolean; sanitize: boolean; strict: boolean; preserveWhitespace: boolean; private disabled; private elementRef; private domSanitizer; private doc; private platformId; private renderer; private zone; private config; private loader; onModelChange(_modelValue?: any): void; onModelTouched(): void; valueGetter: (quillEditor: any, editorElement: HTMLElement) => string | any; valueSetter: (quillEditor: any, value: any) => any; ngAfterViewInit(): void; selectionChangeHandler: (range: Range | null, oldRange: Range | null, source: string) => void; textChangeHandler: (delta: any, oldDelta: any, source: string) => void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; writeValue(currentValue: any): void; setDisabledState(isDisabled?: boolean): void; registerOnChange(fn: (modelValue: any) => void): void; registerOnTouched(fn: () => void): void; validate(): any; /** * Override the default Quill scroll behavior to take into account the formats array and skip non-found ones. Then * registers the plugin to the Quill editor. * * @param QuillInstance The Quill class (not the instance) * @private */ private overrideScrollBehavior; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_readOnly: unknown; static ngAcceptInputType_required: unknown; static ngAcceptInputType_sanitize: unknown; static ngAcceptInputType_strict: unknown; static ngAcceptInputType_preserveWhitespace: unknown; } /** * @deprecated please don't use it. It will be removed */ declare class QuillModule { static forRoot(config?: QuillConfig): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const defaultModules: { toolbar: (string[] | { header: number; }[] | { list: string; }[] | { script: string; }[] | { indent: string; }[] | { direction: string; }[] | { size: (string | boolean)[]; }[] | { header: (number | boolean)[]; }[] | ({ color: any[]; background?: undefined; } | { background: any[]; color?: undefined; })[] | { font: any[]; }[] | { align: any[]; }[])[]; }; /** * @internal This service is not part of the public API of the component */ declare class LoaderService { private dynamicConfig; /** * Load the Quill.js library * * @param path Path to the Quill.js library e.g. "assets/quill/dist". The path must contain the "quill.js" * and "quillEditor.min.css" files and also the css ones. */ load(): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { LoaderService, QUILL_CONFIG_TOKEN, QUILL_DYNAMIC_CONFIG_TOKEN, QuillEditorComponent, QuillModule, defaultModules }; export type { BetterTableModule, Blur, ContentChange, CustomOption, EditorChangeContent, EditorChangeSelection, Focus, QuillConfig, QuillDynamicConfig, QuillFormat, QuillModules, QuillToolbarConfig, Range, SelectionChange, ToolbarItemConfig }; //# sourceMappingURL=eui-components-externals-quill.d.ts.map