Markdown

Markdown.

parse :
{ frontmatter : Maybe (Parser metadata)
}
-> String
-> { metadata : Maybe metadata, blocks : Array Block
}

Parse an entire markdown document with or without frontmatter.

jsonFrontmatter : Decoder metadata -> Parser metadata

JSON frontmatter parser.

toHtml : Block -> Html msg

Transform a Markdown block into HTML.

This function uses the default options:

  • imageLoadingStrategy: eager, the browser default.

If you want to use custom options, check out the toHtmlWithOptions function in the Markdown.Transmutationist module.