token based text panel
This is only a first idea:
Dealing with annotations in TIDO is complicated. We could potentially get rid of the complexity if we work with the text panel a bit differently. Taking Ahiqar's text content rendering as an example where the text is split by tokens we could go a step further.
Annotations markup in text could be based on the token level instead on the hierarchy of the HTML elements. A draft example:
Old:
<span id="target-1">
Highlight
<span id="target-2">
me
</span>
</span>
New:
<span data-target-ids="target-1">Highlight</span>
<span data-target-ids="target-1 target-2">me</span>
In the new version we would only consider the tokens themselves and read a list of target IDs from the token. This could serve for selecting from text where we take an array of target IDs and pass them to the store or for selecting from annotation panel where we take the single target ID and look for tokens that contain that target ID.
Motifs would also benefit from this style because the motif target ID would appear on the necessary token (maybe without start/end helper elements that are currently implemented).