Easy, but not free option would be to use an API such as: https://www.convertapi.com/htm-to-md (maybe you can find a free one out there but this is what I found in a quick search)
The developer option is to use regex to convert it yourself. I didn’t test this but here’s what ChatGPT spat out for me You’ll need to reformat this a bit to get a proper return from a flow script but the logic itself looks like it should work as a starting point:
function htmlToMarkdown(html) {
// Regular expression to match an HTML link
var linkRegex = /<a href="([^"]+)">([^<]+)<\/a>/g;
// Replace HTML links with Markdown links
var markdownText = html.replace(linkRegex, "[$2]($1)");
return markdownText;
}
// Example usage:
var htmlLink = '<a href="https://example.com">Example Website</a>';
var markdownLink = htmlToMarkdown(htmlLink);
console.log(markdownLink); // Output: [Example Website](https://example.com)
So, this issue is that I need to push a markdown link to Tape for Tape comments to render the link. But then when calling the comments over to an external page the markdown link is stripped because html is needed to render the link.
Is it just the reverse of what I mentioned then - instead of converting Markdown to HTML, you want to convert HTML from Jotform to Markdown before putting it into your Tape comment? Not sure if I’m understanding correctly.