@live-html-editor/browser
Version:
An ideal html-editor for development purposes. It has a NEAT output + capability to save directly from browser into your sources
34 lines (33 loc) • 1.26 kB
TypeScript
/**
* @author [S. Mahdi Mir-Ismaili](https://mirismaili.github.io)
* Created on 1398/1/29 (2019/4/18).
*/
export declare const TOOLS_POSITION = "LHE:tools-position";
/**
* https://www.w3schools.com/howto/howto_js_draggable.asp
*/
export declare class Draggable {
static element: HTMLElement;
static handlerEl: HTMLElement;
static onMouseUp: (left: number, top: number, event: MouseEvent) => void;
static x: number;
static y: number;
static makeElementDraggable(el: HTMLElement, handlerEl: HTMLElement, onMouseUp: (left: number, top: number, event: MouseEvent) => void): void;
static onMouseDown(event: MouseEvent): void;
static onMouseMove(event: MouseEvent): void;
}
export declare function getCookie(name: string): string | null;
/**
* https://stackoverflow.com/a/31281201/5318303
*/
export declare function getDomPath(el: any): any[];
export declare function setCookie(key: string, value: string, expireTime: (now: Date) => number): void;
/**
* https://stackoverflow.com/a/55859966/5318303
*/
export declare function getOpenTag(element: HTMLElement): string;
export declare function initiateObject(source: {
[k: string]: any;
}, target: {
[k: string]: any;
}, def: object): void;