import { EventEmitter } from '@angular/core'; import { HttpClient, HttpEvent } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AngularEditorConfig, CustomClass } from './config'; import { MatDialog } from '@angular/material/dialog'; import { ColorWhere, FtpRequest, LinkTargetType, TableDialogResult } from './common/common-interfaces'; import { LangService } from './services/lang.service'; import * as i0 from "@angular/core"; export interface UploadResponse { imageUrl: string; } export declare class AngularEditorService { private http; private doc; private dialog; private langService; savedSelection: Range | null; selectedText: string; uploadUrl: string; uploadWithCredentials: boolean; sen: { [p: string]: string; }; intervalEmitter: EventEmitter; ftpLinkRequired: EventEmitter; ftpLinkGiven: EventEmitter; private _linkDialogOpen; get linkDialogOpen(): boolean; set linkDialogOpen(value: boolean); private ngUnsubscribe; /** * generates HTML table string for insertion * @param definition . * @param config . * @param id . */ static createTableHtml(definition: TableDialogResult, config: AngularEditorConfig, id: string): string[]; constructor(http: HttpClient, doc: any, dialog: MatDialog, langService: LangService); /** * Executed command from editor header buttons exclude toggleEditorMode * @param command string from triggerCommand */ executeCommand(command: string): void; /** * Create URL link * @param url string from UI prompt * @param target _blank or _self */ createLink(url: string, target: LinkTargetType): void; /** * insert color either font or background * * @param color color to be inserted * @param where where the color has to be inserted either text/background */ insertColor(color: string, where: ColorWhere): void; /** * Set font name * @param fontName string */ setFontName(fontName: string): void; /** * Set font size * @param fontSize string */ setFontSize(fontSize: string): void; /** * Create raw HTML * @param html HTML string */ insertHtml(html: string): void; /** * save selection when the editor is focussed out */ saveSelection: () => void; /** * restore selection when the editor is focused in * * saved selection when the editor is focused out */ restoreSelection(): boolean; /** * setTimeout used for execute 'saveSelection' method in next event loop iteration */ executeInNextQueueIteration(callbackFn: (...args: any[]) => any, timeout?: number): void; /** check any selection is made or not */ /** * Upload file to uploadUrl * @param file The file */ uploadImage(file: File): Observable>; /** * Insert image with Url * @param imageUrl The imageUrl. */ insertImage(imageUrl: string): void; setDefaultParagraphSeparator(separator: string): void; createCustomClass(customClass: CustomClass): void; nextNode(node: any): any; getRangeSelectedNodes(range: any, includePartiallySelectedContainers: any): any[]; getSelectedNodes(): any[]; replaceWithOwnChildren(el: any): void; removeSelectedElements(tagNames: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } //# sourceMappingURL=angular-editor.service.d.ts.map