Class HTMLToMarkdown
Options
emphasis Mark
emphasisMark: string
Character to use replacign <em> and <i> tags. Defaults: _
ignore Emphasis
ignoreEmphasis: boolean
Do not include formatting for emphasis
ignore Images
ignoreImages: boolean
Do not include formatting for images
ignore Links
ignoreLinks: boolean
Do not include formatting for links
inline Links
inlineLinks: boolean
Use []() inline links, rather than reference style links
links Each Paragraph
linksEachParagraph: boolean
Place reference-style links after the paragraph they occur in, rather than at the end.
strong Mark
strongMark: string
Characters to use replacing <strong> and <b> tags. Default: **
ul Item Mark
ulItemMark: string
Character to use replacing <li> tags in unordered lists. Default: -
Other
constructor
Create new instance.
Returns HTMLToMarkdown
process
Takes an HTML string passed and processes it with attempts ot output Markdown from it's content.
Parameters
- html: string
Returns string
Staticcreate
create a new object.
Returns HTMLToMarkdown

Convert HTML to Markdown. Based on html2text, this object allows you to take HTML input strings, and convert to Markdown.
When initialized, the options of the
HTMLToMarkdownobject will default to those configured in Drafts settings.Example