mir3z / texthighlighter

-- NO LONGER MAINTAINED -- TextHighlighter allows you to highlight text on web pages.
http://mir3z.github.com/texthighlighter/
MIT License
230 stars 101 forks source link

dynamically add highlights #32

Closed vsoch closed 6 years ago

vsoch commented 7 years ago

hey @mir3z ! This is a really great util! I have a question that (I hope) is pretty straight forward. I have an application where I am saving user highlights by serializing. When they come back to the page, I want the (old) highlights to load automatically. I also have a collaborative function that has users working together, and I am able to send the serialized highlights from one browser to the other in real time. What function do I hand (any highlight / range) to in order for the highlight to show up colored on the screen? Many thanks!

ali-h2010 commented 6 years ago

You just need to deserialize the serialized json which contains all what the deserializer needs such as the number of highlights, location, and range.

just check the serialization example.

vsoch commented 6 years ago

hey @ali-h2010 I fixed this up more than 6 months ago, so I'm ok to close the issue. Thanks!