Markdown
Last updated
Last updated
The Markdown
widget allows you to easily add and style your text using Markdown syntax. By using Markdown, you can add headings, lists, links, images, and more to enhance the presentation of your text content.
content
str
Markdown
content text
height
Union[int, Literal["fit-content"]]
Widget
height
show_border
bool
Display border around Markdown content
widget_id
str
ID of the widget
Determine input Markdown
content.
type: str
default value: ""
Determine Widget
height.
type: int
default value: 300
Determine Widget
height.
type: bool
default value: True
ID of the widget.
type: str
default value: None
set_content(content: str)
Set Markdown
data.
get_content()
Return Markdown
data.
get_height()
Return Markdown
height.
set_height(height: int)
Set Markdown
height.
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/text-elements/005_markdown/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Button
widgets, we will useMarkdown
widgetPrepare a layout for the app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with the layout parameter.