The Markdown widget supports rendering text with Markdown formatting. In additional, advanced functionality allows Markdown text to reference Ontology objects and support on-click events. 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 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:
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.