Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll volunteer to display my total ignorance: I have no idea what you mean when you say "rendering and serialization of selections" or why and how that is useful. Could you elaborate and give some good scenarios in which it (whatever it is) would be useful? I think this could be cool, but I don't understand.


Let's say you want to build a collaboration tool where you write articles. You want to provide a functionality that people can comment on parts inside the article (inline comments) and you need a way to visualize what they marked and also persist the marking (on a server for instance). That what this library is for :).


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.)


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: