Contact usRequest a demo

Markdown in Unblu

Unblu supports a subset of Markdown to style and format text in chat messages and some translations. The subset of elements supported are:

  • Headings

  • Text formatting:

    • Italic

    • Bold

    • Underline

    • Strike through

  • Simple and complex links

  • Ordered and unordered lists

  • Quote blocks

  • Inline and block code

Markdown in chat messages

Use the configuration property com.unblu.conversation.message.chatMessageAsMarkdownEnabled to specify whether your agents and visitors can use Markdown in the messages they write.

If enabled, the content of chat messages entered in the UI’s text input field is interpreted as Markdown. For other message types, such as those from dialog bots, Markdown formatting is applied according to their respective configuration, independently of this setting.

While this configuration property can be set in the scopes APIKEY and AREA, the Unblu server only takes the USER, TEAM, and ACCOUNT scopes into account. If Markdown isn’t enabled for the sender of the message in one of these scopes, the Unblu server coerces the message to the text type SIMPLE_TEXT.

Markdown in system messages

The system messages in Unblu Spark support the same subset of Markdown as chat messages. There’s no configuration property to enable or disable Markdown in system messages.

Markdown in translations

Not all translations support Markdown. If a translation supports Markdown, there’s a note to that effect beneath the input field in the translation editor of the Configuration Interface. The editor for these translations also provides a preview of the formatted translation to the right of the editor input.

Translation editor with Markdown notice and preview pane

Usage

Markdown is straightforward and can be picked up in a few minutes. The examples below demonstrate all the elements of Markdown that Unblu supports.

The examples do not show how to format chat messages well.

Headings

# Heading 1
Main section
## Heading 2
Subsection
### Heading 3
Subsubsection
Markdown headings

Text formatting

You can make text *italic* or **bold** to emphasize it, and you can ==underline== key phrases.
You can also ~~strike through~~ terms.
You can even  ==**combine**== ==*different*== ***formatting*** ==***options***==!
Markdown text formatting options

Line breaks

The lists below demonstrate how line breaks and blocks interact.

1. An item.
1. Another item.
A single line break makes it part of the same item as the previous line.
1. This is the last item. I can end the list by adding *two* line breaks.

This sentence isn't part of either list, it's a paragraph of text between two lists.
The second list starts now:

1. An item.
1. This item consists of two paragraphs, but it isn't the last list item.


To ensure that the second paragraph is indented correctly and that subsequent list items are counted as part of the same list, separate the two paragraphs using *three* line breaks.
1. This is still part of the second list

To add a paragraph after the second list, use *two* line breaks again.
Complex relative link
This behavior only applies to Markdown in chat messages. In text properties, two or more line breaks end a block.
You can simply include a URL: https://www.unblu.com
Line breaks
Alternatively, you can add a link to [some text](https://www.unblu.com "The Unblu website" _blank).
The link above displays the text "The Unblu website" when the cursor hovers over it and will open in a new window.
Complex absolute link
You can create [relative links](/en/business "Business" _blank), too.
Complex relative link

Lists

You can create unordered lists:
+ Unordered list item one
+ Unordered list item two
  + Nested list item
+ Unordered list item three
Unordered list
You can create ordered lists, too. Note that you needn't number the items correctly:
1. Ordered list item one
   1. Nested ordered list item
   1. Another nested ordered list item
1. Ordered list item two
1. Ordered list item three
Ordered list
You can also combine ordered and unordered lists:
1. Ordered list item one
   + Nested unordered list item
     1. Another nesting of an ordered list item
   + Another nested unordered list item
1. Ordered list item two
1. Ordered list item three
Mixed list

Quotes

You can include blockquotes in your Markdown:
> In fact, you can include blockquotes *within* blockquotes:
>> This is a quote within a quote.
Markdown blockquotes

Code

You can display code both inline, e.g. `let i = 42`, or in a code block:
```
const ANSWER = 42;
let i = 42;

if ( i === ANSWER ) {
  findQuestion();
}
```
(With apologies to Douglas Adams.)
Markdown code

Combination

# Bringing it all together
The subset of Markdown Unblu supports is more than enough to
1. Craft *complex* messages that
   + are **easy to read** and
   + provide your ~~users~~ Visitors with a real **benefit**.
1. Allow ==bots== to reduce the number of "simple" queries your Agents deal with.
Find out more about our bot API [here](http://www.unblu.com/en/docs/latest/reference/unblu-web-api/#/api/bots).
Comlex Markdown example