text
Builds a textual content using a provided builder block and returns it as a string.
Return
A string representation of the built content after applying the builder block.
Parameters
block
A lambda function applied to a TextContentBuilder instance, where the textual content is constructed.
Extension function to add text content to a TextContentBuilder.
Useful for embedding text content within other text content.
Example:
TextContentBuilder().apply {
text { +"Some text before markdown." }
text { +"Some other text." }
}Content copied to clipboard
Parameters
init
The text content builder