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.

49 lines (48 loc) 1.62 kB
import { ImageToolbar, ImageToolbarButtons } from './actions'; import { BlotSpec } from './specs'; export interface OverlayOptions { className: string; style: Record<string, string>; } export interface ResizeOptions { handleClassName: string; handleStyle: Record<string, string>; } export interface ToolButtonOption { name: string; icon: string; isActive?: (el: HTMLElement) => boolean; apply: (this: ImageToolbar, el: HTMLImageElement, toolbarButtons: ImageToolbarButtons) => void; } export interface ToolbarButtonOptions { buttons: Record<string, ToolButtonOption | boolean>; } export interface ToolbarOptions extends ToolbarButtonOptions { mainClassName: string; mainStyle: Record<string, unknown>; buttonClassName: string; addButtonSelectStyle: boolean; buttonStyle: Record<string, unknown>; svgStyle: Record<string, unknown>; } export interface BlotFormatterOptionsInput { specs: typeof BlotSpec[]; overlay: Partial<OverlayOptions>; resize: Partial<ResizeOptions>; toolbar: Partial<ToolbarOptions>; } export interface BlotFormatterOptions { specs: typeof BlotSpec[]; overlay: OverlayOptions; resize: ResizeOptions; toolbar: ToolbarOptions; allowInvalidUrl: boolean; } export declare const LEFT_ALIGN = "align-left"; export declare const CENTER_ALIGN = "align-center"; export declare const RIGHT_ALIGN = "align-right"; export declare const COPY = "copy"; export declare const DOWNLOAD = "download"; export declare const PREVIEW = "preview"; declare const DefaultOptions: BlotFormatterOptions; export default DefaultOptions;