An HTML document.
The html
interpolation allows to create Html values from plain string.
Extension methods for Seq[Html]
.
Extension methods for Seq[_]
.
The tmpl
interpolation allows to create Html values from a string template.
The tmpl
interpolation allows to create Html values from a string template.
The template syntax is almost the same as Twirl (https://www.playframework.com/documentation/2.6.x/ScalaTemplates). It is often more convenient that using imbricated string interpolation.
A type class to provide Html rendering.
Provides the ContentEncoder
for HTML documents.
Default instances for the ToHtml type class.
Convert a value to Html using the right ToHtml type class instance.
Convert a value to Html using the right ToHtml type class instance.
If using the provided type class instances, values are encoded this way.:
String
values are safely HTML escaped to avoid XSS issues with generated documents.scala.Option
can be directly inserted. Some
values content is included, whileNone
produces an empty string.scala.Unit
produces an empty string.scala.Seq
outputs every item without any separator.
HTML templating.
Html values can also be easily created from the html interpolation. Conversion from Scala values is done via the ToHtml type class.
They will be encoded as
lol.http.Content
thanks to Html.encoder.