BigBlueHat opened a new issue #47: Interleaving selections within the DOM
URL: https://github.com/apache/incubator-annotator/issues/47
 
 
   Finding selections within the DOM and even wrapping them in an element is 
easy enough, and most developers just "roll their own" highlighter/selector for 
things like that--hence, they don't "shop" for tools like Apache Annotator for 
that.
   
   However, juggling interleaved selections in the DOM is tricky and not 
standardized.
   
   The DOM is a tree. Selections point at regions all over that tree, often 
intermixed.
   
   We should build tooling to handle that interleaving to manage the display, 
removal, eventing, etc, for such selections.
   
   See also #45 and #22.
   
   Example:
   ```html
   <div>
   <mark id="a1">Call me <mark id="a2">Ishmael</mark></mark>. Some years 
ago—never mind how long precisely—<mark id="a3">having little or <mark 
id="a4">no money in my purse</mark></mark><mark id="a4">, and nothing 
particular to interest me on shore</mark>, I thought I would sail about a 
little and see the watery part of the world.
   </div>
   ```
   * a2 is within a1 and so will have eventing and display related trickiness
   * a4 is made up of 2 marks, but is currently invalid as they share an 
`id`--which conceptually "relates" them as a unit, but the DOM doesn't work 
that way.
     * both sets of `<mark/>` elements would need shared events, display, 
removal, etc.
   * a3 also includes 1 part of a4, but not all of it, so weird eventing and 
display issues again
   
   Solving this (or even just exploring it) *is* something developers know they 
need, so likely it should be near the top of our list to solve. 😄 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to