HTML → Markdown
AI-generatedSummary
Converts HTML to Markdown
Inputs
- input (required) — Each item must contain HTML content: when Input Mode is Text, from the 'HTML Text' field; when Binary, from the binary property named by 'Binary Property'. Additional JSON data on the item is passed through.
Output shape
Each item returns the conversion result. If Output Mode is JSON, a field named by 'Markdown Field' (default 'markdown') contains the markdown string; if Include HTML is enabled, the original HTML is also stored under an 'html' field. If Output Mode is Binary, a binary .md file (name set by 'Output Filename', default 'document.md') containing the markdown is stored in the binary property named by 'Output Binary Property' (default 'data'), and the item's JSON is passed through. A warnings array (currently empty) is also included in the JSON output.
Output mode determines whether the markdown appears as JSON field or binary file.
Examples
Example 1: Simple HTML string to markdown field
Input Mode: Text (HTML String); HTML Text: 'Hi'; Output Mode: JSON; Markdown Field: 'markdown' (default); Output: item.json.markdown = 'Hi'
Example 2: HTML binary file to markdown binary file
Input Mode: Binary (HTML File); Binary Property: 'data'; Output Mode: Binary; Output Binary Property: 'data'; Output Filename: 'page.md'; Output: item.binary.data contains a .md file with the converted markdown.