import Quill, { Sources, RangeStatic, Key } from 'quill'; import Delta from 'quill-delta'; import { Emitter } from '@co-hooks/emitter'; import { Ops, IFormats, IQuillOptions, Container, FormatName } from '../types'; export interface IQuillEditorEvent { 'format-change': [IFormats, RangeStatic | null]; 'selection-change': [RangeStatic, RangeStatic, Sources]; 'text-change': [Delta, Delta, Sources]; 'content-change': [Ops, Ops, string, Sources]; } export declare class QuillEditor extends Emitter { protected quillInstance: Quill | null; protected container: Container | null; protected quillOptions: IQuillOptions; protected keepDeleteFormats: boolean; protected static formatScopes: Map; constructor(options: IQuillOptions); static createDelta(deltaOps: Ops): Delta; static getHtmlWithFormats(content: string, formats: IFormats): string; static getHtmlFromOps(deltaOps: Ops): string; get quill(): Quill; get linesCount(): number; get isEmpty(): boolean; init(container: Container): void; dispose(): void; updateFormats(range?: RangeStatic | null): void; getQuillOption(key: keyof IQuillOptions): string | boolean | HTMLElement | import("quill").StringMap | undefined; setContents(deltaOps?: Ops): void; moveTail(): void; moveHead(): void; setSelection(index: number, length?: number): void; setSelection(range: RangeStatic): void; setFormats(formats?: IFormats): void; setFormat(formatName: FormatName, value: any, update?: boolean): void; getFormats(range?: RangeStatic): IFormats; getDeltaOps(): Ops; protected bindEvents(): void; addBinding(key: Key, callback: (range: RangeStatic, context: any) => void, context: any): void; protected unshiftBinding(key: number | Array, context: any, handler: (range: RangeStatic, context: any) => void): void; }