Markdown
The Markdown
tag is used to display markdown-formatted text content on the labeling interface. Use this tag to provide rich text instructions, descriptions, or content with formatting support including headers, bold text, lists, links, and more.
Also that’s the simplest way to display auxiliary text content on the labeling interface.
Use with the following data types: Text content in Markdown format.
Parameters
Param | Type | Description |
---|---|---|
display | block | inline |
|
[style] | string |
CSS style string |
[className] | string |
Class name of the CSS style to apply. Use with the Style tag |
[idAttr] | string |
Unique ID attribute to use in CSS |
[visibleWhen] | region-selected | choice-selected | no-region-selected | choice-unselected |
Control visibility of the content. Can also be used with the when* parameters below to narrow visibility |
[whenTagName] | string |
Use with visibleWhen . Narrow down visibility by tag name. For regions, use the name of the object tag, for choices, use the name of the choices tag |
[whenLabelValue] | string |
Use with visibleWhen="region-selected" . Narrow down visibility by label value. Multiple values can be separated with commas |
[whenChoiceValue] | string |
Use with visibleWhen ("choice-selected" or "choice-unselected" ) and whenTagName , both are required. Narrow down visibility by choice value. Multiple values can be separated with commas |
Example
Display static markdown instructions on the labeling interface:
<View>
<Markdown>
## Instructions
Please **carefully** read the following text and mark all entities.
- Look for **person names**
- Look for **organization names**
- Look for **locations**
> Remember to be thorough in your analysis.
</Markdown>
<Text name="text" value="$text" />
</View>
Indents are important in markdown, so it’s advised to keep markdown content unindented.
Example
Display markdown content from task data:
<View>
<Markdown value="$markdown_description" />
<Text name="text" value="$text" />
</View>
Example task data:
{
"markdown_description": "## Analysis Task\n\nPlease analyze the following text for sentiment:\n\n- **Positive** - Shows satisfaction or approval\n- **Negative** - Shows dissatisfaction or criticism\n- **Neutral** - Shows no particular sentiment",
"text": "The product was amazing and I loved it!"
}
Example
Display styled markdown content:
<View>
<Markdown
value="$content"
style="background: #f5f5f5; padding: 15px; border-radius: 8px; border-left: 4px solid #007bff;" />
</View>
Supported Markdown Features
The Markdown tag supports standard Markdown syntax including:
- Headers -
# ## ### ####
etc. - Bold and italic -
**bold**
and*italic*
- Lists - Ordered (
1. item
) and unordered (- item
) - Links -
[link text](URL)
- Code - Inline
`code`
and code blocks with ``` - Blockquotes -
> quoted text
- Line breaks - Double line breaks create new paragraphs