Fellow programmers, simple feature, hard answer:
I have a desktop version of a database which allow users to highlight some portions of the text when selecting it with the mouse (using rangy, the javascript gives the db the relative position of the selection and the database handles the modification to change background color).
I have some lines of code to interact with touch interfaces and give me the X,Y for the first and last points in a touch. What I need is to extract the text between this coordinates. In layman terms, I need to simulate a mouse click in the first X;Y, a mouse press and a mouse release in the last X;Y. If I could do this, the rest could work itself using the rangy method.
One option that seems reasonable is inserting nodes in the X and Y coordinates, but I'm not aware if this is possible. Would http://yuilibrary.com work on this?
If anyone has a better option (a iPad selection handling jquery plugin, for example), it would be great. I do not want to select the text as it is in the iPad (hold and adjust the limits). I want it to be as fluid as, say, highlighting on paper on in the uPad app.
thanks