Interplay of text and annotation panel

Does the target ID of the AnnotationAPI have to have a specific format?

Generally, the ID provided in the AnnotationAPI’s and the ID of the corresponding HTML element have to comply to the requirements of HTML id attributes.

If your source data is XML we recommend using XPath’s generate-id() function to create such an ID.

How do I establish the connection between the TextAPI and the AnnotationAPI so that TIDO is able to display it?

TIDO is designed to recognize the target of an annotation if the part after the last slash in a target’s ID matches the ID of an element in the text panel.

Take this HTML element which is displayed in the text panel as an example:

<span id="N." class="person">Johann Wolfang von Goethe</span>

To enable TIDO to detect an annotation referring to this element, the corresponding entry in the AnnotationAPI would have to look like this:

"body": {
    "type": "TextualBody",
    "value": "Johann Wolfgang von Goethe is a famous German poet.",
    "format": "text/plain",
    "x-content-type": "Person"
"target": {
    "format": "text/xml",
    "language": "en",
    "id": ""
"type": "Annotation",
"id": ""

Anything before the last slash (in this case aren’t considered for establishing the connection.


How can I use the TextAPI to express that my item has RTL text?

Currently, the TextAPI provides no information on the language’s directional flow (LTR/RTL).

To display your RTL text passages correctly in TIDO you can use a designated CSS class for the element in your HTML you want to have displayed in RTL:

<div class="rtl">
    <span class="line">Some text</span>
    <span class="line">… and some more text</span>

Add the following rule to the CSS file you provide in the Support Object:

.rtl {
    direction: rtl;


The documents provided here are licensed under CC-BY-ND-4.0 (via SPDX). This encompasses the main Text API specifications as well as the Annotations Specification and the modules.