import frappe import markdownify @frappe.whitelist() def html_to_markdown(html_content): return markdownify.markdownify(html_content, heading_style="ATX")