Kotoba.Nodes.Image (Kotoba v0.5.0)

Copy Markdown View Source

An image from a URL, in the text (type "image"): Markdown's ![alt](url "title"). The JSON keys are url, alt and title.

An image that a person uploads is a Kotoba.Nodes.Attachment; this node is the image of Markdown, a URL that the document links to.

The URL is checked with Kotoba.Sanitizer.link_url/2. An image with a URL that is not safe, or under the :untrusted policy (which loads no file from a URL), renders as its alternative text.

Summary

Types

t()

@type t() :: %Kotoba.Nodes.Image{
  alt: term(),
  extra: term(),
  title: term(),
  url: term(),
  version: term()
}