tagBuilder
fun <B : TagBuilder> TagNodeRenderer<B>.tagBuilder(name: String, pretty: Boolean = this.pretty, init: B.() -> Unit = {}): B
Creates a generic builder.
Example usage:
tagBuilder("name") {
+content
}
.someOption()
.build()
Content copied to clipboard
Return
the new builder
Parameters
name
tag name
pretty
whether the output code should be pretty. Defaults to the corresponding attached pipeline option if there is one, or false
otherwise.
init
action to run at initialization
A quick way to create a simple tag builder. Example:
tagBuilder("name", content)
.someOption()
.build()
Content copied to clipboard
Return
the new builder
Parameters
name
tag name
content
nodes to render as HTML within the tag