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 (see here for a colour picker to get Hex codes). You can also use HTML colour names 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:
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:
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.
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
Text Alignment
Default depends on the application. Either default text alignment for the document, or left aligned
Bold
Italic
Underline
Strike-through
Line break
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:
Last updated
Was this helpful?