The Markdown widget supports rendering text with Markdown formatting. Advanced functionality within the widget can be used to enable additional workflows such as attribution, citation, and user tagging on text.
Module builders configuring a Markdown widget can use the following features:
The below screenshot shows an example of a configured Markdown widget including object references, where text anchors that have attached Ontology object references are shown underlined and are selectable:

The example below shows a configured Markdown widget displaying annotation objects with the following user interactions configured on the embedded objects:
The screenshot below shows the initial state of an unconfigured Markdown widget alongside its initial configuration panel.

For the Markdown widget, the core configuration options are the following:
Input data: Text/Variable
Display options:
Tag type configuration
Enable monospace font: Toggle to enable/disable displaying text in the widget in monospace font.
Enable scrolling: Toggle to enable/disable scrolling for the widget.
Allow long word wrap: Toggle to enable/disable wrapping of long, unbroken strings (such as long URLs) that exceed the width of the widget. When enabled, which is the default for new widgets, such strings break onto the next line instead of overflowing the widget.
Break on newlines: Toggle to control how single line breaks in the Markdown source are rendered. When enabled, which is the default for new widgets, a single newline in the source begins a new line in the rendered output. When disabled, single newlines are collapsed into spaces, following standard Markdown rendering.
Text alignment: Sets the alignment of the rendered Markdown content within the widget. Choose Left (the default), Center, or Right.
Explicit per-column alignment defined in Markdown table syntax (for example, | :---: |) takes precedence over the widget-level text alignment setting. Code blocks remain left-aligned and full-width regardless of the selected alignment.
User text selection:
The following are some examples of supported Markdown syntax. Note that the highlight syntax ==text== and task lists are supported despite not being standard in typical Markdown implementations. A table showing supported Markdown syntax and corresponding examples follows below.
Markdown supports headers ranging from level 1 to level 6.
| Syntax type | Markdown syntax |
|---|---|
| Main Header | # Main header |
| Subheader | ### sub header |
| Italics | I *think* this |
| Bold | **sentence** is |
| Bold and italic | ***very important*** |
| Strikethrough | ~pretty good~ or ~~pretty good~~ |
| Highlight | ==great== |
| Inline Code | `share` |
| Code Block | See code blocks below |
| Blockquote | > This is a blockquote |
| Unordered List | - Item 1- Item 2 |
| Ordered List | 1. First item2. Second item |
| Nested List | Indent an item to align with the first character of the parent item |
| Horizontal Rule | --- or *** |
| Link | [title](https://palantir.com) |
| Bare URL | https://palantir.com |
| Image |  |
| Task List | - [ ] Task 1- [x] Task 2 |
| Table | See tables below |

Separate the header row from the body rows with a row of hyphens. Add colons to the separator row to set per-column alignment:
Copied!1 2 3 4| Left aligned | Centered | Right aligned | | :----------- | :------: | ------------: | | Row 1 | Data 1 | 1.00 | | Row 2 | Data 2 | 22.50 |
Per-column alignment defined in table syntax takes precedence over the widget-level Text alignment setting.
Wrap a code block in three backticks. Add a language identifier after the opening backticks to enable syntax highlighting:
Copied!1 2 3 4```python def get_flight_delay(alert_id): return alerts[alert_id].delay_minutes ```
The ==text== syntax applies a single, fixed highlight color. This color cannot be changed from Markdown syntax: there is no attribute, parameter, or alternate syntax that sets a highlight color, so ==text== always renders in the default color.
Because the widget does not render HTML, inline styles such as <mark style="background-color: blue">text</mark> also do not change the color. Instead, they display as literal text. See Limitations.
To display highlights in other colors, use one of the following configuration-driven options, where the color is set in the widget configuration panel rather than in the Markdown text:
Inline references support a statically defined color, a color inherited from an Ontology property with formatting configured, or conditional formatting rules based on object property values. Annotations support a statically defined color or conditional formatting rules. Conditional formatting can display different colors for objects of the same object type or annotation layer.
The following Markdown input combines several of the syntax types above. Paste it into the Text input of a Markdown widget to see the rendered result:
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25# Flight delay summary ## Status Newark airport has **two high-priority delays** and ==one unresolved alert==. The *estimated* recovery time is ~~90 minutes~~ 45 minutes. | Alert | Delay (minutes) | Status | | :----- | --------------: | :---------: | | A00150 | 45 | Unresolved | | A00182 | 20 | Resolved | > Delay figures are refreshed every 15 minutes. ### Follow-up items - [x] Notify the gate agents - [ ] Update the passenger notice board - [ ] Terminal A - [ ] Terminal B Refer to the `flight-alert` object type for the full schema, or see the [status page](https://palantir.com) for live updates. ---
As an advanced feature, the Markdown widget allows builders to tag subsets of Markdown text ("anchors") and then use these anchors to link to specific Ontology objects and trigger Workshop on-click events.
The format for creating one of these anchors is as follows:
Copied!1:objectreference[$text_to_display]{objectType="$object_type_id" primaryKey="$object_primary_key"}
The following example references two Flight Alerts objects within a sentence. First, look at the desired end-state that should appear on-screen for users. Note: each of the Flight Alert objects reference below is individually selectable by a user and will then become the output selected object set of the Markdown widget.

To achieve the above, the backing Markdown input is the following:
Newark airport has __*rarely*__ seen flight issues in May, but there were two high-priority delays: :objectreference[Alert A00150]{objectType="flight-alert" primaryKey="A00150"} and :objectreference[Alert A00182]{objectType="flight-alert" primaryKey="A00182"}
Beyond the syntax describe above for the Markdown input, builders can also configure the following options for object references:
The :objectreference renderer uses the objectType and primaryKey attributes to resolve a reference. The highlight color is not part of the syntax: it is resolved from the Highlight color configured for the matching object type. To display two references in two different static colors, reference two different object types and configure a different Highlight color for each one, as in the following example:
Copied!1 2 3Two delays were reported at :objectreference[Newark]{objectType="airport" primaryKey="EWR"}: :objectreference[Alert A00150]{objectType="flight-alert" primaryKey="A00150"} and :objectreference[Alert A00182]{objectType="flight-alert" primaryKey="A00182"}.
With the above input, the airport reference and the two flight-alert references each display in the Highlight color set for their own object type. Adding a color attribute to the syntax itself has no effect, and references to object types that are not listed under Object types display as plain text.
The color can also vary between individual objects of the same object type. To do this, set the object type's Highlight color to inherit from an Ontology property with formatting configured, or define conditional formatting rules based on property values.
Object references in Markdown can also have standard Markdown formatting applied. The screenshot below contains a variety of examples of Markdown formatting, such as headings and tables embedded with objects.

The Annotation option can be used to display annotation objects on text using the Markdown widget. This option also allows users to interact with text within the widget by creating new annotation objects on selected portions of text, or running actions and events on the displayed annotation objects.
Annotation objects capture selected text using zero-indexed numeric indices, with an inclusive start index and an exclusive end index, to represent the text selection's start and end positions. Markdown widget annotations currently do not support negative indices.
Upon selection of the Annotation option, the following configuration will be available:
The Markdown widget does not support rendering HTML. HTML provided to the Markdown widget will be rendered as text. This includes inline styles, so HTML cannot be used to control colors, fonts, or spacing in the rendered output.
The ==text== highlight syntax applies a single, fixed color that cannot be changed from Markdown. Colored highlights are instead configured on object types or annotation layers in the widget configuration panel. See text highlighting.