UITextElement
Represents a text element in a panel. Markdown is supported.
Examples
simple
{
type: "Text",
content: "Hello, world!",
}
with links
{
type: "Text",
content: "Fill the form https://www.google.com.",
}
markdown
{
type: "Text",
content: "**Hello**, _world_!",
}
complex markdown
Complex markdown syntax is supported like tables, images, quotes, etc.
{
type: "Text",
content: `
# Heading
This is a paragraph.
## Subheading
This is a paragraph.
| Name | Age |
| ---- | --- |
| John | 25 |
| Jane | 30 |

> This is a quote.
[Link](https://www.google.com)
`,
}
Properties
type
type:
"Text"
content
content:
string
The text to display in the element.
id
id:
string
The ID of the element.
onCreate()?
optional
onCreate: (args
: {id
:string
; }) =>void
A function to call when the element is created.
Parameters
Parameter
Type
Description
args
{ id
: string
; }
The arguments passed to the function.
args.id
string
The id of the element.
Returns
void
onDestroy()?
optional
onDestroy: (args
: {id
:string
; }) =>void
A function to call when the element is destroyed.
Parameters
Parameter
Type
Description
args
{ id
: string
; }
The arguments passed to the function.
args.id
string
The id of the element.
Returns
void
Last updated
Was this helpful?