UNPKG

ngx-tiptap-editor

Version:

[![Build and Publish](https://github.com/HuiiBuh/ngx-tiptap-editor/actions/workflows/publish.yml/badge.svg)](https://github.com/HuiiBuh/ngx-tiptap-editor/actions/workflows/publish.yml) [![Deploy to Github Pages](https://github.com/HuiiBuh/ngx-tiptap-edito

75 lines (74 loc) 3.7 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, Injector, NgZone, OnDestroy, Type } from '@angular/core'; import type { EditorOptions, Extensions } from '@tiptap/core'; import { Editor } from '@tiptap/core'; import type { ParseOptions } from 'prosemirror-model'; import { ExtensionBuilder } from '../../extensions/base-extension.model'; import { TipBaseExtension } from '../../extensions/tip-base-extension'; import { TiptapEventService } from '../../services/tiptap-event.service'; import { TiptapExtensionService } from '../../services/tiptap-extension.service'; import * as i0 from "@angular/core"; export declare class EditorComponent implements AfterViewInit, OnDestroy { private ngZone; private injector; private cd; private tiptapExtensionService; private platformId; private globalExtensions; private globalAngularExtensions; jsonChange: EventEmitter<Record<string, any>>; htmlChange: EventEmitter<string>; created: EventEmitter<Editor>; beforeCreate: EventEmitter<{ editor: Editor; }>; create: EventEmitter<{ editor: Editor; }>; update: EventEmitter<{ editor: Editor; }>; selectionUpdate: EventEmitter<{ editor: Editor; }>; transaction: EventEmitter<{ editor: Editor; transaction: import("prosemirror-state").Transaction<any>; }>; focus: EventEmitter<{ editor: Editor; event: FocusEvent; }>; blur: EventEmitter<{ editor: Editor; event: FocusEvent; }>; destroy: EventEmitter<{}>; content: object | string | null; injectCSS: boolean; autofocus: boolean; editable: boolean; editorProps: EditorOptions['editorProps']; parseOptions: ParseOptions; enableInputRules: boolean; enablePasteRules: boolean; extensions: Extensions; angularExtensions: ExtensionBuilder<any, Type<TipBaseExtension<any>>>[]; runEventsOutsideAngular: boolean; private editorComponent; private headerComponent; private footerComponent; private tiptap; private destroy$; private builtExtensions; constructor(ngZone: NgZone, injector: Injector, cd: ChangeDetectorRef, tiptapExtensionService: TiptapExtensionService, platformId: any, globalExtensions: Extensions | null, globalAngularExtensions: ExtensionBuilder<any, any>[] | null, eventService: TiptapEventService, element: ElementRef); get editor(): Editor | null; ngAfterViewInit(): Promise<void>; ngOnDestroy(): void; private registerEvents; private buildEditorOptions; private mergeNativeAndAngularExtensions; private pipeTo; private setEditorInAngularExtension; static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, [null, null, null, null, null, { optional: true; }, { optional: true; }, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "tip-editor", never, { "content": "content"; "injectCSS": "injectCSS"; "autofocus": "autofocus"; "editable": "editable"; "editorProps": "editorProps"; "parseOptions": "parseOptions"; "enableInputRules": "enableInputRules"; "enablePasteRules": "enablePasteRules"; "extensions": "extensions"; "angularExtensions": "angularExtensions"; "runEventsOutsideAngular": "runEventsOutsideAngular"; }, { "jsonChange": "jsonChange"; "htmlChange": "htmlChange"; "created": "created"; "beforeCreate": "beforeCreate"; "create": "create"; "update": "update"; "selectionUpdate": "selectionUpdate"; "transaction": "transaction"; "focus": "focus"; "blur": "blur"; "destroy": "destroy"; }, ["editorComponent", "headerComponent", "footerComponent"], ["tip-editor-header", "tip-editor-body", "tip-editor-footer"]>; }