You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to handle Turkish character issues when using Text-Range-Module in Rangy library for word search in HTML documents? #485
I am using the Text-Range-Module in the Rangy library to search for a word in an HTML document. However, I am having trouble with Turkish characters, and it's not finding the word I'm looking for. An example word is 'Çincesinde.'
@DemaPy This might be ok for temporary highlighting on the frontend, but I don't think there's a way to serialize and persist these highlights in a database.
@mokhosh XPath can be used to store Ranges. But since the Highlight API doesn't support selecting a specific highlight region, it's not possible to delete this.
@mokhosh I found that it's possible to use Range.isPointInRange() and Range.intersectsNode() to identify a specific Range. However, each time we make a selection, we need to iterate through all the ranges in the Highlight.
Activity
emrecanmuslu commentedon Aug 7, 2023
@timdown can you help me with this issue?
DemaPy commentedon Sep 4, 2024
@emrecanmuslu you have to try to use https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API along with https://developer.mozilla.org/en-US/docs/Web/API/Range and https://developer.mozilla.org/en-US/docs/Web/API/Highlight
mokhosh commentedon Apr 9, 2025
@DemaPy This might be ok for temporary highlighting on the frontend, but I don't think there's a way to serialize and persist these highlights in a database.
hhk-png commentedon Jul 2, 2025
@mokhosh XPath can be used to store Ranges. But since the Highlight API doesn't support selecting a specific highlight region, it's not possible to delete this.
hhk-png commentedon Jul 2, 2025
@mokhosh I found that it's possible to use
Range.isPointInRange()andRange.intersectsNode()to identify a specific Range. However, each time we make a selection, we need to iterate through all the ranges in the Highlight.