text

Display either rendered markdown (GitHub Flavored Markdown) or raw text with no interpretation of markup.

Text blocks can be declared as named resources at the top level of a mod, or they can be declared as anonymous blocks inside a dashboard or container, or be re-used inside a dashboard or container by using a text with base = <mod>.text.<text_resource_name>.

Example Usage

text {
width = 2
value = <<-EOM
# I am some markdown text.
*I* respect ***markdown***.
EOM
}

Argument Reference

ArgumentTypeOptional?Description
baseText ReferenceOptionalA reference to a named text resource that this text should source its definition from. title and width can be overridden after sourcing via base.
titleStringOptionalA plain text title to display for this text.
typeStringOptionalmarkdown (default) or raw.
valueStringOptionalThe markdown or html string to use. Can also be sourced using the HCL file function.
widthNumberOptionalThe width as a number of grid units that this item should consume from its parent.

More Examples

Plain Text

text {
width = 2
type = "raw"
value = "<h2>I am a HTML title, but I'll be displayed as-is</h2>"
}