UNPKG

@textbus/editor

Version:

Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.

27 lines (26 loc) 829 B
import { Observable } from '@tanbo/stream'; import { FormItem } from './help'; import { ViewController } from '../types'; export interface FormConfig { title?: string; editProperty?: 'attrs' | 'styles'; items: Array<FormItem>; mini?: boolean; confirmBtnText?: string; cancelBtnText?: string; } export declare class Form implements ViewController<Record<string, any>> { private config; onComplete: Observable<Record<string, any>>; onCancel: Observable<void>; body: HTMLElement; footer: HTMLElement; readonly elementRef: HTMLFormElement; private completeEvent; private cancelEvent; constructor(config: FormConfig); addItem(item: FormItem, index?: number): void; removeItem(item: FormItem): void; reset(): void; update(value: Record<string, any>): void; }