Hacker News new | ask | show | jobs
by WaltPurvis 4031 days ago
Thank you. So am I correct in thinking this would be useful if you wanted to let people select a portion of an article and save just that portion to a database? (If so, I'll be using it immediately.)
1 comments

If you just want to select a portion of a text that would be working with build-in browser APIs (see https://developer.mozilla.org/en-US/docs/Web/API/Window/getS...). Marklib can be used to make a selection visible and persistent. Especially if you want to display a lot of inline comments for instance and you need to paginate trough the result, this library can be handy because it allows marking, even if the document has been altered before with another rendering.