Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i save texthighlighter in DB #22

Open
vahidsamimi opened this issue Aug 3, 2016 · 3 comments
Open

How can i save texthighlighter in DB #22

vahidsamimi opened this issue Aug 3, 2016 · 3 comments

Comments

@vahidsamimi
Copy link

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
Copy link

You need to:

  • serialize the highlights.
  • send it to the server .
  • parse it using your backend server wether php or c# or any other language.
  • store the text in the DB

@wellitongervickas
Copy link

wellitongervickas commented Aug 8, 2018

how i show highlighted after page load?

@ali-h2010
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants