UNPKG

@opentiny/fluent-editor

Version:

A rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It's powerful and out-of-the-box.

24 lines (23 loc) 713 B
import { AnyFunction } from '../config'; import { default as FluentEditor } from '../fluent-editor'; export interface ICounterOption { format?: 'text' | 'html'; unit?: 'word' | 'char'; count?: number; template?: string | AnyFunction; errorTemplate?: string | AnyFunction; } export default class Counter { quill: FluentEditor; container: HTMLDivElement; options: ICounterOption; constructor(quill: FluentEditor, options: ICounterOption); resolveOptions(options: ICounterOption): { format: string; unit: string; template: string; count: number; } & ICounterOption; renderCount: () => void; getContentLength(format: any): number; }