timdown / rangy

A cross-browser JavaScript range and selection library.
MIT License
2.24k stars 368 forks source link

Uncaught TypeError: rangy__WEBPACK_IMPORTED_MODULE_4__.resoreSelection is not a function #479

Open sorcamarian opened 1 year ago

sorcamarian commented 1 year ago

I have installed rangy in a Angular2+ application. It appears that the function "rangy.resoreSelection" is not found.

I've also installed the types: https://www.npmjs.com/package/@types/rangy

https://github.com/timdown/rangy/wiki/Selection-Save-Restore-Module

import * as rangy from 'rangy';

sorcamarian commented 1 year ago

I had to import the other file

import rangy from 'rangy';
import 'rangy/lib/rangy-selectionsaverestore.js';