I have also collaborated on a project on github that does this. At this moment, it is only tested in browser.
html2markdown
I have done a lot of testing on web. Added ton of unit tests. Still not perfect but works nicely. Feedback welcome and I will be happy to receive pull requests or fix any defects you find.