610ef8f043
* Add utility functions for saving and restoring the caret location * Implement cross-browser.getSelection * Save and restore location on ContentEditable * Fix refocus by clicking on a field that had a non-collapsed selection
15 lines
435 B
TypeScript
15 lines
435 B
TypeScript
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
import { registerPackage } from "../../lib/register-package";
|
|
|
|
import { saveSelection, restoreSelection } from "./document";
|
|
|
|
registerPackage("anki/location", {
|
|
saveSelection,
|
|
restoreSelection,
|
|
});
|
|
|
|
export { saveSelection, restoreSelection };
|
|
export type { SelectionLocation } from "./selection";
|