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:
The following are some examples of supported Markdown syntax. Note that the highlight syntax ==text==
and tasklist are supported despite not being standard in typical Markdown implementations. A table showing supported Markdown syntaxes and their corresponding examples follows below.
Markdown supports subheaders 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 |
Strikethrough | ~pretty good~ |
Highlight | ==great== |
Inline Code | `share` |
Code Block | ``` \n example code \n ``` |
Blockquote | > This is a blockquote |
Unordered List | - Item 1 - Item 2 |
Ordered List | 1. First item 2. Second item |
Horizontal Rule | --- or *** |
Link | [title](https://palantir.com) |
Image |  |
Task List | - [ ] Task 1 - [x] Task 2 |
Table | See below for syntax |
Table Syntax Example
Copied!1 2 3 4
| Header 1 | Header 2 | |----------|----------| | Row 1 | Data 1 | | Row 2 | Data 2 |
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:
:objectreference[$text_to_display]{objectType="$object_type_id" primaryKey="$object_primary_key"}
Let's walk through an example where we're attempting to reference two Flight Alerts objects within a sentence. First, let's look at the desired end-state we'd like to 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:
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.