Open eyeseast opened 5 months ago
Some options:
Thomas Wilburn wrote a converter: https://github.com/Chalkbeat/powertoys/blob/main/paraphrase/htmlToMarkdown.js
Showdown has an undocumented HTML to markdown converter: https://github.com/showdownjs/showdown/blob/master/src/converter.js#L360
CommonMark probably does it, but can't find documentation right now. There are a bunch of libraries on NPM that might work but I don't want to dig through that pile.
Tom MacWright has more options here: https://macwright.com/2024/01/28/dont-use-marked
Some fields allow (some) HTML. We should have a way to edit that text, without just asking people to write HTML from scratch.
The current site has an HtmlField component. We probably need something similar.
It would be very nice if we could turn the server-sent HTML into Markdown for editing, and then back into HTML to save.