3 ms·
i'm going to do a shameless plug for my github project here because it's quite related but not large enough to dedicate an entire thread to it. it converts DOM
by leeoniya 15y ago
i'm going to do a shameless plug for my github project here because it's quite related but not large enough to dedicate an entire thread to it. it converts DOM > markdown on the client.
https://github.com/leeoniya/reMarked.js https://github.com/leeoniya/reMarked.js
the stated goal is to integrate into existing WYSIWYG html editors to produce markdown output. kind of like Markdownify, but on the client.
yay markdown! :D
- rayhano 15y agoWe've also installed markdown into Hackful (the HN for Europe) - it's a bit hit and miss though, especially with line breaks http://Hackful.com http://Hackful.com
- leeoniya 15y agoyes, line breaks are oddballs. it was especially fun in my testing since every markdown > html converter treats whitespace differently and it's possible to have many extra text nodes as well as leading trailing whitespace, etc. makes testing a faithful round trip very difficult indeed. and then there are different flavors to account for...
- saryant 15y agoI ended up writing a Markdown plugin to a client-side WYSIWYG editor. I needed the ability to store formatted text in MS SQL without either uploaded a binary blob (.doc/.pdf) or using a WYSIWYG with HTML output. Markdown is exactly what we needed but there weren't any good JS WYSIWYG editors available, so I hacked one together.
- leeoniya 15y agoyep, same requirement here...