import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import EditorJS, { EditorConfig, OutputData, SanitizerConfig } from '@editorjs/editorjs'; import { Observable } from 'rxjs'; import { NgxEditorJSService } from '../services/editorjs.service'; import { Block } from '../types/blocks'; /** * The main directive of `ngx-editorjs` provides a way to attach * an EditorJS instance to any element and control it via * Angular services and components * * To use attach to any element with an `id` property * * @example *
*/ export declare class NgxEditorJSDirective implements OnDestroy, OnChanges, AfterContentInit { protected readonly el: ElementRef; protected readonly editorService: NgxEditorJSService; protected readonly cd: ChangeDetectorRef; /** * On Destroyed subject */ private readonly onDestroy$; /** * Form touched state */ private touched$; /** * The DOM element ID, it will use the Directive DOM element ID or falls back to the provided `holder` property */ private id; /** * Boolean, If set to true the EditorJS instance gets autofocus when initialized */ autofocus: boolean; /** * Boolean, If set to true the toolbar will not show in the EditorJS instance */ hideToolbar: boolean; /** * String, the ID property of the element that the EditorJS instance will be attached to */ holder: string; /** * String, The type of block to set as the initial block type. This needs to match a name in the `UserPlugins` object. * The default value is "paragraph" */ initialBlock?: string; /** * Number, The minimum height of the EditorJS instance bottom after the last block */ minHeight: number; /** * String, The text to display as the placeholder text in the first block before content is added */ blockPlaceholder: string; /** * SanitizerConfig, The configuration for the HTML sanitizer */ sanitizer: SanitizerConfig; /** * String Array, If empty all tools available via the plugin service will be added. If a string * array is set only the tools with the provided keys will be added */ excludeTools: string[]; /** * Number, Used with Angular Forms this sets an autosave timer active that calls the EditorJS save * method. This patches the `FormControl` value with every block change and focus and blur, it also autosaves after * a set time * Set to 0 to disable or pass a value in `ms` of the autosave time */ autosave: number; /** * Blocks, An initial set of block data to render inside the component */ blocks: Block[]; /** * Emits if the content from the EditorJS instance has been saved to the component value */ hasSaved: EventEmitter