All pages
Powered by GitBook
1 of 1

Loading...

EDC -Guide for writing Visual Labels

The 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).

<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 (). You can also use instead of Hex codes.

And here is an example of choosing the font family:

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

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.

Label Formatting

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

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

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.

The correct way to do this is:

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.

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.

Here is an example that uses all supported styles and tags:

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

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

Bold

Italic

Underline

Strike-through

Line break

Bold

<strong></strong>

Italic

<em></em>

Underline

<u></u>

Strike-through

<s></s>

Option

Example

Notes

Text colour

Defaults to black if not specified

Background colour

Defaults to transparent if not specified

Font Family

Defaults to Calibri if not specified

Font Size

Defaults to 10px if not specified

see here for a colour picker to get Hex codes
HTML colour names
Sample visual formatting

Text Alignment

<span style="color:#00FF00">Classification: {classification}</span>                
<span style="color:DarkTurquoise">Classification: {classification}</span>
<span style="font-family:Calibri">Classification: {classification}</span>
<span style="color:#00FF00;font-family:Calibri">Classification: {classification}</span>
<span style="font-family:Calibri">Classification: <span style="color:#00FF00">{classification}</span></span>
<span style="color:#00FF00;font-family:Calibri">Classification: <strong><em>{classification}</em></strong></span>
<strong><em>Incorrect</strong></em>
<strong><em>Correct</em></strong>
<span>Line 1<br>Line 2</span>
<span style="color:#00FF00">Example</span>
<span style="background-color:#00FF00">Example</span>
<span style="font-family:Calibri">Example</span>
<span style="font-size:10px">Example</span>
<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>
<span style="text-align:left">Example</span>
<span><strong>Example</strong></span>
<span><em>Example</em></span>
<span><u>Example</u></span>
<span><s>Example</s></span>
<span>Line 1<br>Line 2</span>