rangy-selectionsaverestore
Version:
A cross-browser DOM range and selection library
44 lines • 1.47 kB
TypeScript
/**
* Selection save and restore module for Rangy.
* Saves and restores user selections using marker invisible elements in the DOM.
*
* Part of Rangy, a cross-browser JavaScript range and selection library
* https://github.com/timdown/rangy
*
* Depends on Rangy core.
*
* Copyright %%build:year%%, Tim Down
* Licensed under the MIT license.
* Version: %%build:version%%
* Build date: %%build:date%%
*/
import * as api from "rangy2";
export declare function saveRange(range: any, direction: any): {
document: Document;
markerId: any;
collapsed: boolean;
startMarkerId?: undefined;
endMarkerId?: undefined;
backward?: undefined;
toString?: undefined;
} | {
document: Document;
startMarkerId: any;
endMarkerId: any;
collapsed: boolean;
backward: any;
toString: () => string;
markerId?: undefined;
};
export declare function restoreRange(rangeInfo: any, normalize: any): api.WrappedRange;
export declare function saveRanges(ranges: any, direction: any): any[];
export declare function saveSelection(win: any): {
win: any;
rangeInfos: any[];
restored: boolean;
};
export declare function restoreRanges(rangeInfos: any): any[];
export declare function restoreSelection(savedSelection: any, preserveDirection: any): void;
export declare function removeMarkerElement(doc: any, markerId: any): void;
export declare function removeMarkers(savedSelection: any): void;
//# sourceMappingURL=index.d.ts.map