Premailex.HTMLToPlainText (Premailex v1.0.0)

Copy Markdown View Source

Converts Premailex.html_tree/0 into plain text.

Summary

Functions

Converts a Premailex.html_tree/0 into a plain text string.

Functions

process(tree)

@spec process(Premailex.html_tree()) :: String.t()

Converts a Premailex.html_tree/0 into a plain text string.

Examples

iex> tree = Premailex.parse("<html><body><ul><li>Test</li></ul></body></html>")
iex> Premailex.HTMLToPlainText.process(tree)
"* Test"