A type that works with BaseScalaTemplate This used to support +=, but no longer is required to.
A type that works with BaseScalaTemplate This used to support +=, but no longer is required to.
Change name to reflect not appendable
Appendable content using a StringBuilder.
Appendable content using a StringBuilder. Either specify elements or text, not both.
Using an Either[TraversableOnce[A], String] impacts performance in an already contentious part of code, so it has been done with both parameters instead.
self-type
Generic type representing content to be sent over an HTTP response.
A template format defines how to properly integrate content for a type T
(e.g.
A template format defines how to properly integrate content for a type T
(e.g. to prevent cross-site scripting attacks)
The underlying type that this format applies to.
Content type used in default HTML templates.
Content type used in default HTML templates.
This has 3 states, either it's a tree of elements, or a leaf, if it's a leaf, it's either safe text, or unsafe text that needs to be escaped when written out.
Type used in default JavaScript templates.
Brings the template engine as a string interpolator.
Brings the template engine as a string interpolator.
Basic usage:
import play.twirl.api.StringInterpolation val name = "Martin" val htmlFragment: Html = html"<div>Hello $name</div>"
Three interpolators are available: html
, xml
and js
.
Content type used in default text templates.
Content type used in default XML templates.
Helper for HTML utility methods.
Formatter for HTML content.
Helper for JavaScript utility methods.
Formatter for JavaScript content.
Imports that provide Twirl language features.
Imports that provide Twirl language features.
This includes:
- @defining - @using - iterable/option/string as boolean for if statements - default values (maybeFoo ? defaultFoo)
Imports for useful Twirl helpers.
Helper for utilities Txt methods.
Formatter for text content.
Helper for XML utility methods.
Formatter for XML content.
(Since version 1.2.0) Use TwirlDefaultImports instead