-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting the html source from the selection #11
Comments
I too dont understand how to get the highlighted text from html source? if you know please post the answer. |
The highlighted text is being passed in to the app in the javascript interface method selectionChanged(rangyRange, text, handleBounds, menuBounds); If you were going to change the way the selection works i.e. plain text vs html, etc. You would do that in the javascript. |
Thank you for your response. i am developing epub reader. In this user will select the text with the long press once the action complete. i need to highlight the selected text .i can get the text and rangyRange as 2/9/2:0,0/15/2:734 With the rangy value how can i keep selected text with the highlighten? Can you please help me? |
I'm not sure what you're asking. |
Let me explain in detail. I am developing epub reader which contains html to load in webview. When user long press the text in webview, i nee to hightlight the text where user press and it should ask the option to hightlight. Once user came back to particular point where user selected already it should highlight remains same. As now i can take the selected text and rangy value but i dont know how to hightlight once again when the user comes to particular page where he already highlighted. |
You'll have to add some javascript to highlight a given rangy range, then store the rangy range given by the selection process in a database. When the page loads, redo the highlighting and unhighlighting in the order it was originally done. Or, you could take the html contents of the page after each highlighting action and overwrite your stored file with it. |
Thanks for your response.
I dont know how to proceed the above things in coding. Can you please help me? |
very good work with this library!
Is there a way to get the html source of the highlighted text?
The text was updated successfully, but these errors were encountered: