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

How can i save texthighlighter in DB #22

Open vahidsamimi opened 8 years ago

vahidsamimi commented 8 years ago

Hi , i have a question: i have a DB in server and in want to save selected text into Table. how can i do that?

Tnx Vahid

ali-h2010 commented 6 years ago

You need to:

wellitongervickas commented 6 years ago

how i show highlighted after page load?

ali-h2010 commented 6 years ago

@wellitongervickas , This is a little bit different than the original issue but still doable. You just need to retrieve the text from the DB and pass it to the deserializeHighlights(serialized) method

You don't need to parse the data like in my first answer since you do that if you want to extract the text or any specific info about the highlighted text.

Check the example to understand more. Select a small part and check the console after serializing and deserializing. http://mir3z.github.io/texthighlighter/demos/serialization.html