Skip to content
Advertisement

Tag: rangy

Rangy selection not working on Microsoft Edge

The below code snippet is working well for all browsers except Microsoft Edge. Is there anything we need to specifically add for Edge? Answer After a lot of research, came to solution that rangy.createHighlighter() without any parameters won’t work for Edge. You need to specify the “TextRange” additional parameter (see below). The default is “textContent”. Reference: https://github.com/timdown/rangy/wiki/Highlighter-Module

Advertisement