You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @danielweck ,
I want to click on the location of the information and the content of the selected text, such as:[NSString stringWithFormat:@"document.elementFromPoint(%f, %f).src", touch.x, touch.y];
window.getSelection().getRangeAt(0).toString() ;
I have a getElementFromPoint method found in the file(readium-shared-js.js) But I don't know how to use.
Thanks and waiting on your response.
The text was updated successfully, but these errors were encountered:
dengzhucai
changed the title
In iOS how to click on the location and text strings?
In iOS How to get the click on the location of the information and get the selected text string?
Nov 24, 2016
Using Javascript code, you could implement a small routine that creates a text range selection in the DOM based on the location of the user's click / touch.
Then, you could exploit the DOM selection created by the webview, simply by using the existing "highlights" plugin: https://github.com/readium/readium-shared-js/tree/develop/plugins/highlights
Hi @danielweck ,
I want to click on the location of the information and the content of the selected text, such as:[NSString stringWithFormat:@"document.elementFromPoint(%f, %f).src", touch.x, touch.y];
window.getSelection().getRangeAt(0).toString() ;
I have a getElementFromPoint method found in the file(readium-shared-js.js) But I don't know how to use.
Thanks and waiting on your response.
The text was updated successfully, but these errors were encountered: