Dust.HTML.Inline (Dust v0.0.2-dev) View Source

Inlines image assets into given content which is the list of lines.

Link to this section Summary

Functions

Search each line and inline assets which represent images

Link to this section Types

Specs

assets() :: [Dust.Asset.t()]

Specs

content_list() :: [String.t()]

Link to this section Functions

Link to this function

inline(lines, assets, drop_string \\ nil)

View Source

Specs

inline(content_list(), assets(), String.t() | nil) :: content_list()

Search each line and inline assets which represent images

Parameters:

  • lines list of strings of raw HTML,
  • assets collection of images,
  • drop_string optional parameter which is a string which you may want to drop from original content.

Returns:

  • [String.t()] HTML content with Base64 encoded and embedded images.