UNPKG

@plait/angular-text

Version:

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

38 lines (37 loc) 2.23 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnInit, Renderer2, SimpleChanges } from '@angular/core'; import { Editor, Element } from 'slate'; import { SlateEditable } from 'slate-angular'; import { TextChangeData, TextPlugin } from '@plait/common'; import { PlaitBoard } from '@plait/core'; import * as i0 from "@angular/core"; export 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: import("slate").BaseEditor & import("slate-angular").AngularEditor & import("slate-history").HistoryEditor & import("@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) => import("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>; }