View Source Premailex (Premailex v0.3.16)
Documentation for Premailex.
Link to this section Summary
Link to this section Functions
Specs
Adds inline styles to an HTML string.
examples
Examples
iex> Premailex.to_inline_css("<html><head><style>p{background-color: #fff;}</style></head><body><p style=\"color: #000;\">Text</p></body></html>")
"<html><head><style>p{background-color: #fff;}</style></head><body><p style=\"background-color: #fff; color: #000;\">Text</p></body></html>"
Specs
Turns an HTML string into text.
examples
Examples
iex> Premailex.to_text("<html><head><style>p{background-color:#fff;}</style></head><body><p style=\"color:#000;\">Text</p></body></html>")
"Text"