epub.js
epub.js copied to clipboard
Check if range is Highlighted
trafficstars
How to avoid highlighting the same range? , even in the example if you select the text that is already highlighted it will highlight again.
Any update?
How to avoid highlighting the same range? , even in the example if you select the text that is already highlighted it will highlight again.
I managed to do this with browser local storage. Store the highlighted ranges in local storage as array of string. Every time new highlight is done, compare the highlight cfi with local storage string array. If the array does not have the entry then highlight and update the local storage string array.