UNPKG

@textbus/editor

Version:

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

35 lines (34 loc) 1.18 kB
import { Injector } from '@tanbo/di'; import { Keymap, QueryState } from '@textbus/core'; import { UISegmentDropdown } from './_utils/_api'; import { Tool } from '../types'; import { ViewController } from '../../uikit/types'; export interface SegmentDropdownToolConfig<T = any> { /** 快捷键配置 */ keymap?: Keymap; /** 给当前控件添加一组 css class */ classes?: string[]; /** 给当前控件添加一组 icon css class */ iconClasses?: string[]; /** 当鼠标放在控件上的提示文字 */ tooltip?: string; /** 设置控件显示的文字 */ label?: string; viewController: ViewController<T>; onInit?(ui: UISegmentDropdown): void; useValue?(value: T): void; queryState?(): QueryState<T>; onDestroy?(): void; } export declare class SegmentDropdownTool implements Tool { private factory; private subs; private config; private viewer; private controller; constructor(factory: (injector: Injector) => SegmentDropdownToolConfig); setup(injector: Injector, limitElement: HTMLElement): HTMLElement; disabled(is: boolean): void; refreshState(): void; onDestroy(): void; }