UNPKG

@plait/angular-text

Version:

Text processing implementation, supports commonly used rich text formats, such as font size, color, bold, italics, etc.

51 lines (47 loc) 2.58 kB
import * as _plait_angular_text from '@plait/angular-text'; import * as slate_history from 'slate-history'; import * as slate_angular from 'slate-angular'; import { SlateEditable, AngularEditor, ViewType } from 'slate-angular'; import * as slate from 'slate'; import { Element, Editor } from 'slate'; import * as i0 from '@angular/core'; import { OnInit, AfterViewInit, OnChanges, Renderer2, ElementRef, ChangeDetectorRef, SimpleChanges } from '@angular/core'; import { TextPlugin, TextChangeData } from '@plait/common'; import { PlaitBoard } from '@plait/core'; declare class PlaitTextComponent implements OnInit, AfterViewInit, OnChanges { renderer2: Renderer2; private cdr; elementRef: ElementRef<HTMLElement>; hostClass: string; children: Element[]; textPlugins?: TextPlugin[]; set text(text: Element); readonly: boolean; slateEditable: SlateEditable; onChange: (data: TextChangeData) => void; afterInit?: (editor: Editor) => void; onComposition: (event: CompositionEvent) => void; board: PlaitBoard; editor: slate.BaseEditor & slate_angular.AngularEditor & slate_history.HistoryEditor & _plait_angular_text.PlaitTextEditor; nativeElement(): HTMLElement; constructor(renderer2: Renderer2, cdr: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>); valueChange(): void; ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; ngAfterViewInit(): void; renderElement: (element: Element) => slate_angular.ViewType; renderText: any; compositionStart: (event: CompositionEvent) => void; compositionUpdate: (event: CompositionEvent) => void; compositionEnd: (event: CompositionEvent) => void; onKeydown: (event: KeyboardEvent) => void; scrollSelectionIntoView: () => void; static ɵfac: i0.ɵɵFactoryDeclaration<PlaitTextComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<PlaitTextComponent, "plait-text", never, { "textPlugins": { "alias": "textPlugins"; "required": false; }; "text": { "alias": "text"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "onChange": { "alias": "onChange"; "required": false; }; "afterInit": { "alias": "afterInit"; "required": false; }; "onComposition": { "alias": "onComposition"; "required": false; }; "board": { "alias": "board"; "required": false; }; }, {}, never, never, true, never>; } interface PlaitTextEditor extends AngularEditor { renderElement?: (element: Element) => ViewType; board: PlaitBoard; } export { PlaitTextComponent }; export type { PlaitTextEditor };