@textbus/editor
Version:
Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.
33 lines (32 loc) • 1.06 kB
TypeScript
import { Injector } from '@tanbo/di';
import { Keymap, QueryState } from '@textbus/core';
import { Tool } from '../types';
import { ViewController } from '../../uikit/types';
export interface DropdownToolConfig {
/** 快捷键配置 */
keymap?: Keymap;
/** 给当前控件添加一组 css class */
classes?: string[];
/** 给当前控件添加一组 icon css class */
iconClasses?: string[];
/** 当鼠标放在控件上的提示文字 */
tooltip?: string;
/** 设置控件显示的文字 */
label?: string;
viewController: ViewController<any>;
queryState(): QueryState<any>;
useValue(value: any): void;
onDestroy?(): void;
}
export declare class DropdownTool implements Tool {
private factory;
private config;
private viewer;
private controller;
private subs;
constructor(factory: (injector: Injector) => DropdownToolConfig);
setup(injector: Injector, limitElement: HTMLElement): HTMLElement;
refreshState(): void;
disabled(is: boolean): void;
onDestroy(): void;
}