/********** Angular **********/ import { OnInit, AfterViewInit } from '@angular/core'; /********** Plugin **********/ import { EditorComponent, EditorPasteEvent } from '@progress/kendo-angular-editor'; import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar'; import { DialogRef, DialogService } from '@progress/kendo-angular-dialog'; /********** Component & Service **********/ import { InputFieldBase } from '../components/inputfieldbase.component'; import { ZComponentService } from '../services/zcomponent.service'; import { AlertService, CompressImageService, FontAweSomeService, ToastService, ZComponent } from 'mmhglobal-zcore'; import * as i0 from "@angular/core"; export declare class ZtexteditorComponent extends InputFieldBase implements ZComponent, OnInit, AfterViewInit { readonly componentService: ZComponentService; readonly fontAweSomeService: FontAweSomeService; private readonly dialogService; private readonly alertService; private readonly compressImage; private readonly toastService; editor: EditorComponent; compress_btn: ToolBarButtonComponent; pasteCleanupSettings: { removeMsClasses: boolean; removeMsStyles: boolean; removeInvalidHTML: boolean; [key: string]: any; }; componentSettings: { iframe: boolean; [key: string]: any; }; isCompressModeOn: boolean; CloseEnlargeBtn: boolean; dialogRef?: DialogRef; private originalInlineStyle; private readonly compressionEnableIcon; private readonly compressionDisabledIcon; constructor(componentService: ZComponentService, fontAweSomeService: FontAweSomeService, dialogService: DialogService, alertService: AlertService, compressImage: CompressImageService, toastService: ToastService); /** Initialize component state and editor configuration. */ ngOnInit(): void; /** Notify component service once view is ready. */ ngAfterViewInit(): void; /** Sync editor content to zModel and trigger configured change handler. */ onChange(value: unknown): void; /** Handle paste: normalize plain-text special entities, then optionally compress pasted base64 images. */ onPaste(e: EditorPasteEvent): Promise; /** * If the paste is plain text (no HTML tags and no images), normalize common entities and insert as real text. * Returns true when the event is handled and default paste is prevented. */ private handleCommonSymbolTags; /** * If compression is enabled and compress mode is ON, compress any pasted base64 images (data:image/*). * IMPORTANT: modifies e.cleanedHtml (what gets pasted), not editor.value. */ private handleImageCompression; /** * Toggle compress mode via confirmation dialog. */ onOffCompressMode(event: Event): void; /** Focus editor if available. Returns true if focus succeeded. */ focus(): boolean; getFontAwesome(iconName: string, fontAwesomeService: FontAweSomeService): unknown; /** Merge paste cleanup options from data.Options (string expression or object) into pasteCleanupSettings. */ private setupPasteCleanupSettings; /** Trigger hidden file input click for image upload. */ openFileExplorer(): void; /** Open an enlarged popup editor. */ openPopup(): void; /** Close the popup editor if open. */ onPopupClose(): void; /** * Handle change and insert selected image into editor. * NOTE: Prefer typing fileInput as Event for better safety. */ uploadImage(fileInput: Event): void; /** Insert image into editor, optionally compressing first. */ private insertImageIntoEditor; /** Convert base64 (data URL) to File. */ private base64ToFile; /** * Compress an image file if it is an image and above min threshold. * Returns the compressed file, or null if not compressible / compression skipped. */ private imageCompression; /** Normalize image compression config into byte-based thresholds. */ private compressionConfigHandler; /** * Convert size string like "100kb", "1 MB", "2gb" to bytes. * If no unit is provided, bytes are assumed. */ private convertSizeToByte; /** Read a File as base64 data URL. */ private readFileAsDataURL; /** Extract event target as HTMLElement safely. */ private getEventTargetElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }