@textbus/platform-browser
Version:
Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.
26 lines (25 loc) • 585 B
TypeScript
/**
* 选区焦点可视位置
*/
export interface Rect {
left: number;
top: number;
width: number;
height: number;
}
export interface UIElementParams {
classes?: string[];
attrs?: {
[key: string]: any;
};
props?: {
[key: string]: any;
};
styles?: {
[key: string]: any;
};
children?: (Node | null)[];
on?: Record<string, (ev: Event) => void>;
}
export declare function createElement(tagName: string, options?: UIElementParams): HTMLElement;
export declare function getLayoutRectByRange(range: Range): Rect;