This module contains some useful functions for parsing and rendering Html.
Render some html if a boolean expression evaluates to False.
Maybe, the resource has an author. Render what's in the maybe, or nothing.
view : Model -> Html msg
view model =
article []
[ h1 [] [ text "Article" ]
, viewMaybe model.author
(\authorName -> p [] [ text authorName ])
]Remove all Html nodes from a String
example :: String
example =
stripHtml "<p>Hola!</p>"
--> "Hola!"This unescapes character entity references as well. If parsing fails the original String is returned
Convert a String to Html
This unescapes character entity references as well
Truncate a String and append ... if the String is longer than provided length
example : String
example =
truncate 10 "Truncate a String and append `...` if the String is longer than provided length"
--> "Truncate a..."
Render some html if a boolean expression evaluates to
True.