HtmlToMarkdown. InlineDataMedia
(html_to_markdown v3.17.2)
Copy Markdown
What the output shows for an image, an embedded media element, or a link, whose address is
an inline data: URL.
Applies to <img> (including its lazy-load attributes, its srcset candidates and the
<source> elements of a <picture> around it), <graphic>, inline <svg>, <video>,
<audio> (including their nested <source> elements), <iframe>, and a link (<a href>)
whose own address is a data: URL.
With AltTextOnly or DropElement, an element that also has an address that is not data:
uses that address instead. The document structure follows the markdown: a dropped image has
no node, and an image written as its alt text has no address. A link whose only content the
choice removed is dropped with it.
A link has no attribute separate from its own text to use as a caption, so AltTextOnly and
DropElement do the same thing to a link's data: address: write the link's text with no
destination. Unlike an image, a link's text is never dropped along with the address.
Summary
Types
What the output shows for an image, an embedded media element, or a link, whose address is an inline data: URL.
Functions
Write the alt text (the title for an <svg>, the fallback content for <video> and <audio>) without a destination.
Write nothing for the element.
Write the data: URL as the destination, payload included. Default.
Returns the serde wire value this variant carries on the JSON boundary (see wire_variant_value in alef's naming module) -- distinct from the atom's Elixir spelling.
Types
Functions
@spec alt_text_only() :: t()
Write the alt text (the title for an <svg>, the fallback content for <video> and <audio>) without a destination.
@spec drop_element() :: t()
Write nothing for the element.
@spec keep() :: t()
Write the data: URL as the destination, payload included. Default.
Returns the serde wire value this variant carries on the JSON boundary (see wire_variant_value in alef's naming module) -- distinct from the atom's Elixir spelling.