MessageML supports the following tags for formatting content within a message:
Examples
Here after you can find an example of a message sent by a bot and containing these formatting and semantics tags as well as the structure of the messageML sent:
<messageML>
<h1>Formatting and semantics</h1>
<p>This is a <a href="https://docs.developers.symphony.com/">Link</a> to our developer documentation.</p>
<p>Part 1 of the paragraph separated from part 2 with a line break.<br/>Part 2 of the paragraph.</p>
<p>This text can be either <b>bold</b> or <i>italic</i> or <span style="color:red;">red</span>, or even combine <b><i style="color:red;">several</i></b> formatting tags.</p>
<pre>This is a preformatted text.</pre>
<code language="html"><h1>Code sample</h1>
<p>This is some html</p></code>
</messageML>
Versions and Compatibility
Last updated
Tag
Description
Optional attributes
<br/>
Insert a line break.
None.
<a href="url">Link Text</a>
Insert a hyperlink that will be displayed in the message.
Bold formatting.
Note: when receiving a message from an Agent that contains whitespace between the last character in a bolded section and the closing </b> tag, the bold section will be returned in Markdown (i.e. surrounded by double '*' characters) instead of XHTML tags.
Italics formatting.
Note: when receiving a message from an Agent that contains whitespace between the last character in an italics-formatted section and the closing </i> tag, the italics section will be returned in Markdown (i.e. surrounded by single '*' characters) instead of XHTML tags.
• class: color options.• Non-HTML MessageML shorthand tags are not supported inside <pre>.
<span>text</span>
No formatting.
• This tag can be used to specify visual styles, by adding a class attribute.• This tag is used to create Structured objects.
• class: color options.• data-entity-id
• See below for list of translated PresentationML attributes.
<code>code sample</code>
Format the text as a block of code.
language: Use the language attribute to benefit from language specific code highlighting. The following languages are available: c, cpp, csharp, css, html, java, js, jsx, php, python, r, typescript, tsx, plaintext, yaml, scala, json, shell, markdown
Note: language attribute is only available with Agent 20.14+.
Note: please see escaping rules for Special Characters when using code tag