Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The below table mentions the formats that are accepted for visual labels in All the plugins -Word, Excel, PowerPoint and Outlook.

...

Option

...

agent allows for formatting to be specified for visual labels using HTML. However, only specific HTML tags are used as MS Office applications don’t support all possible HTML tags (such as images). As such, this is a guide on what features are supported by the agent’s visual tagging, and how to write some basic labels, with examples. For more advanced labels, it is recommended to get familiar with writing HTML.

Basic Labels

Here is an example of the most basic possible example. All visual labels must start with <span> and end with </span>. In the below example, {classification} will be replaced with the chosen classification value (eg, Public, General Business, etc). This applies no formatting at all, default values will be applied (more info below).

Code Block
languagehtml
<span>Classification: {classification}</span>

Label Styles

It is possible to apply style options to the text such as text colour, where colour is defined as Hex code (see here for a colour picker to get Hex codes). You can also use HTML colour names instead of Hex codes.

Code Block
languagehtml
<span style="color:#00FF00">Classification: {classification}</span>
Code Block
languagehtml
<span style="color:DarkTurquoise">Classification: {classification}</span>

And here is an example of choosing the font family:

Code Block
languagehtml
<span style="font-family:Calibri">Classification: {classification}</span>

To apply more than one style, the different options must separated by a semi-colon, such as:

Code Block
languagehtml
<span style="color:#00FF00;font-family:Calibri">Classification: {classification}</span>

If you want to apply a different style to only some of the text, you can do so by adding more <span> tags. In the below example only the classification will have the colour applied, but all of the text will be Calibri. NOTE: if you add an opening <span> tag. there must be a corresponding closing </span> tag.

Code Block
languagehtml
<span style="font-family:Calibri">Classification: <span style="color:#00FF00">{classification}</span></span>

Label Formatting

It also possible to make text bold, italic, underlined or strike-through. Using some special tag types. These are:

Bold

<strong></strong>

Italic

<em></em>

Underline

<u></u>

Strike-through

<s></s>

Note how these all require opening and closing tags, as with <span>. Here is an example of how these can be used:

Code Block
languagehtml
<span style="color:#00FF00;font-family:Calibri">Classification: <strong><em>{classification}</em></strong></span>

NOTE: tags must be closed in the reverse order in which they were opened. Since tags can contain other tags, you cannot close a tag before you have closed any tags contained within them.

For example, this is incorrect as the <em> tag was opened after the <strong> tag.

Code Block
languagehtml
<strong><em>Incorrect</strong></em>

The correct way to do this is:

Code Block
languagehtml
<strong><em>Correct</em></strong>

Line breaks

It is possible to add multiple lines to visual labels. If a label is too long to fit on one line it will automatically wrap around to the next line as expected, but it is possible to deliberately split the label into different lines using the <br> tag. Note that unlike all other tags used by the agent, the <br> tag does not require a closing tag.

Code Block
languagehtml
<span>Line 1<br>Line 2</span>

All Supported Styles/Tags

Here is a list of all supported styles and tags in the agent as well as examples for their usage. Other HTML tags are ignored and not used by the agent, and may cause unintended problems, so it best to just use the below options when writing labels.

Option

Example

Notes

Text colour

Code Block
languagehtml
<span style="color:#00FF00">Example</span>

Defaults to black if not specified

Background colour

Code Block
languagehtml
<span style="background-color:#00FF00">Example</span>

Defaults to transparent if not specified

Font Family

Code Block
languagehtml
<span style="font-family:Calibri">Example</span>

Defaults to Calibri if not specified

Font Size

Code Block
languagehtml
<span style="font-size:10px">Example</span>

Defaults to 10px if not specified

Text Alignment

Code Block
languagehtml
<span style="text-align:left">Example</span>

Default depends on the application. Either default text alignment for the document, or left aligned

Bold

Code Block
languagehtml
<span><strong>Example</strong></span>

Italic

Code Block
languagehtml
<span><em>Example</em></span>

Underline

Code Block
languagehtml
<span><u>Example</u></span>

Strike-through

Code Block
languagehtml
<span><s>Example</s></span>

Line break

Code Block
languagehtml
<span>Example<br>Example<<span>Line 1<br>Line 2</span>

Other HTML tags are ignored and not used for formatting.Here is an example that uses all supported styles and tags:

Code Block
languagehtml
<span style="color:#FFFFFF;background-color:#FF0000;font-family:Calibri;font-size:10px;text-align:center">Classification: <strong><em>{classification}</em><strong><br><u><s>Classified by GetVisibility</s></u></span>

Which produced the following as a header visual label on a blank Word document:

...