UNPKG

ngx-jodit

Version:

Angular wrapper for jodit WYSIWYG editor

53 lines (52 loc) 2.77 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { Jodit } from 'jodit'; import { JoditConfig } from './types'; import * as i0 from "@angular/core"; export declare class NgxJoditComponent implements ControlValueAccessor, AfterViewInit, OnDestroy { private readonly cdr; joditContainer: ElementRef; jodit?: Jodit; /** * options for jodit. * You can add more supported options even Typescript doesn't suggest the options. */ private _options?; set options(value: JoditConfig); private valueSubject; set value(value: string); get value(): string; valueChange: EventEmitter<string>; joditChange: EventEmitter<string>; joditKeyDown: EventEmitter<KeyboardEvent>; joditKeyUp: EventEmitter<KeyboardEvent>; joditMousedown: EventEmitter<MouseEvent>; joditMouseup: EventEmitter<MouseEvent>; joditClick: EventEmitter<PointerEvent>; joditFocus: EventEmitter<FocusEvent>; joditPaste: EventEmitter<ClipboardEvent>; joditResize: EventEmitter<void>; joditBeforeEnter: EventEmitter<KeyboardEvent>; joditBeforeCommand: EventEmitter<string>; joditAfterExec: EventEmitter<void>; joditAfterPaste: EventEmitter<ClipboardEvent>; joditChangeSelection: EventEmitter<void>; private joditInitializedSubject; private valueSubscription?; private internValueChange; constructor(cdr: ChangeDetectorRef); isHTML(text: string): boolean | ""; ngAfterViewInit(): void; ngOnDestroy(): void; initJoditContainer(): void; changeValue(value: string): void; onChange: (text: string) => void; onTouched: () => void; writeValue(text: string): void; registerOnChange(fn: (text: string) => void): void; registerOnTouched(fn: () => void): void; setDisabledState?(isDisabled: boolean): void; private prepareText; static ɵfac: i0.ɵɵFactoryDeclaration<NgxJoditComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgxJoditComponent, "ngx-jodit", never, { "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "joditChange": "joditChange"; "joditKeyDown": "joditKeyDown"; "joditKeyUp": "joditKeyUp"; "joditMousedown": "joditMousedown"; "joditMouseup": "joditMouseup"; "joditClick": "joditClick"; "joditFocus": "joditFocus"; "joditPaste": "joditPaste"; "joditResize": "joditResize"; "joditBeforeEnter": "joditBeforeEnter"; "joditBeforeCommand": "joditBeforeCommand"; "joditAfterExec": "joditAfterExec"; "joditAfterPaste": "joditAfterPaste"; "joditChangeSelection": "joditChangeSelection"; }, never, never, true, never>; }