Files
NapCatQQ/.pnpm-store/v3/files/d2/5bb4c43ca78a144f68967c5c410c4a604c453d36a2794c6edf0e0580c97412e788b5681c930f3b22ea79fc48b2f94b7431febb48e117ad86a1bbd6337214a1
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

25 lines
1.0 KiB
Plaintext

import Quill from '../core/quill.js';
import Module from '../core/module.js';
import type { Range } from '../core/selection.js';
type Handler = (this: Toolbar, value: any) => void;
export type ToolbarConfig = Array<string[] | Array<string | Record<string, unknown>>>;
export interface ToolbarProps {
container?: HTMLElement | ToolbarConfig | null;
handlers?: Record<string, Handler>;
option?: number;
module?: boolean;
theme?: boolean;
}
declare class Toolbar extends Module<ToolbarProps> {
static DEFAULTS: ToolbarProps;
container?: HTMLElement | null;
controls: [string, HTMLElement][];
handlers: Record<string, Handler>;
constructor(quill: Quill, options: Partial<ToolbarProps>);
addHandler(format: string, handler: Handler): void;
attach(input: HTMLElement): void;
update(range: Range | null): void;
}
declare function addControls(container: HTMLElement, groups: (string | Record<string, unknown>)[][] | (string | Record<string, unknown>)[]): void;
export { Toolbar as default, addControls };