Giter Club home page Giter Club logo

Comments (7)

spdeepa avatar spdeepa commented on July 17, 2024

I too dont understand how to get the highlighted text from html source? if you know please post the answer.

from btandroidwebviewselection.

btate avatar btate commented on July 17, 2024

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.

from btandroidwebviewselection.

spdeepa avatar spdeepa commented on July 17, 2024

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?

from btandroidwebviewselection.

btate avatar btate commented on July 17, 2024

I'm not sure what you're asking.

from btandroidwebviewselection.

spdeepa avatar spdeepa commented on July 17, 2024

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.

from btandroidwebviewselection.

btate avatar btate commented on July 17, 2024

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.

from btandroidwebviewselection.

spdeepa avatar spdeepa commented on July 17, 2024

Thanks for your response.

     "When the page loads, redo the highlighting and unhighlighting in the order it was originally done."

I dont know how to proceed the above things in coding. Can you please help me?

from btandroidwebviewselection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.