I am familiar with a bunch of libraries that can highlight text in a page using HTML. For example by inserting a span that has a class to a particular word that needs to be highlighted. What I want to do is to highlight text without modifying the HTML part of the text where the word is.
I thought that it can be done until I was checking Grammarly on Medium and I saw that words were highlighted but when inspected the code, the text did not had anything particular that would highlight the word. I took a screenshot that shows what I am talking about. The textarea is unmodified but words are clearly highlighted.
What I am asking is, is there a library in jquery or javascript that does this?