Open dengzhucai opened 7 years ago
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.