mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 04:31:36 +08:00
TextPanel: Support code formats (#53850)
This commit is contained in:
@ -15,6 +15,26 @@ weight: 1100
|
||||
|
||||
# Text
|
||||
|
||||
The text panel visualization lets you make information and description panels for your dashboards.
|
||||
The text panel enables you to directly include text or HTML in your dashboards. This can be used to add contextual information and descriptions or embed complex HTML.
|
||||
|
||||
In **Mode**, select whether you want to use markdown or HTML to style your text, then enter content in the box below. Grafana includes a title and paragraph to help you get started, or you can paste content in from another editor.
|
||||
## Mode
|
||||
|
||||
**Mode** determines how embedded content appears.
|
||||
|
||||
### Markdown
|
||||
|
||||
This option formats the content as [markdown](https://en.wikipedia.org/wiki/Markdown).
|
||||
|
||||
### HTML
|
||||
|
||||
This setting renders the content as [sanitized](https://github.com/grafana/grafana/blob/code-in-text-panel/packages/grafana-data/src/text/sanitize.ts) HTML. If you require more direct control over the output, you can set the
|
||||
[disable_sanitize_html]({{< relref "../setup-grafana/configure-grafana/#disable_sanitize_html" >}}) flag which enables you to directly enter HTML.
|
||||
|
||||
### Code
|
||||
|
||||
This setting renders content inside a read-only code editor. Select an appropriate language to apply syntax highlighting
|
||||
to the embedded text.
|
||||
|
||||
## Variables
|
||||
|
||||
[Variables]({{< relref "../variables/syntax/" >}}) in the content will be expanded for display.
|
||||
|
Reference in New Issue
Block a user