Convert HTML to Markdown with Javascript