timdown / rangy

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

rangy-highlighter partial un-highlight supported? #426

Open abrekken opened 7 years ago

abrekken commented 7 years ago

Unless I'm missing something, I don't see that this feature is supported in the rangy highlighter.

Example: select some text and call highlightSelection(). Then select a portion of the highlighted text and call unhighlightSelection(). What happens is it will find any highlights that intersect with what you've selected (our 1 and only highlight in this example) and then remove the whole thing.

I'm happy to submit a PR to add partial unhighlight ability, but first thought I'd see if anyone else has done this and/or if this project is still being maintained? Thanks,

abrekken commented 6 years ago

Just an FYI, I have a PR out there for this.

ZachSaucier commented 1 year ago

The PR.