Giter Site home page Giter Site logo

Comments (6)

ufb avatar ufb commented on June 29, 2024 1

Hi AlphaHasi,
the next 2 weeks I'm very busy, but next month there will be a major update and I will check if the requested feature is something that can be included.

from textmarker.

ufb avatar ufb commented on June 29, 2024

Just did some research on how this feature could be realised. Unfortunately it's non-trivial:
The easiest way would be to use window.find recursively, since this will select the searched text, which would make it very easy to wrap it with a highlight element - but this method is non-standard and should not be used.
Extensions can also use the browser's find API, but this doesn't select the text (the highlightings on a search are actually not wrapping elements and therefore of no use) - which means Textmarker would have to iterate over all text nodes and this is where it gets complicated...
So, all-in-all, it's definately not a feature that I can add before releasing 4.0.0. I will dig deeper though in order to find a good solution, but can't promise anything for the near future.

from textmarker.

AlphaHasi avatar AlphaHasi commented on June 29, 2024

Thanks for the research! I have no idea about the browser's native APIs (as a developer I only worked for content "inside" the browser) and assumed it would be an easy thing to add.

There was a popular add on "SearchWP", that was old type and had not a real replacement after the support was canceled. It is deleted from the servers now (and it is not the one plugin you find for WP on the internet). But I found another add on (now updated to new code) that can provide the functionality. Unfortunately it is not very stable (at least on my system) and does often not work at all, for example on WordPress pages, that have an user frame around the content (this typical grey border with your user name on top of each page after login). That was never an issue for the SearchWP add on. https://addons.mozilla.org/de/firefox/addon/highlightall/

If this would be complex to add and the result would be just unstable code, don't do it. Also the lack of others joining the topic might indicate the insignificance of this feature.

from textmarker.

ufb avatar ufb commented on June 29, 2024

I had a look at the source code of the cited addon just now - it is using the browser's find API for temporary hilighting and a nodeIterator otherwise - the developer is acknowledging lots of edge cases, iframes etc.
It's definately makeable, but devil is in the details. If it was just for hilighting without saving your highlights to Textmarker's history then this should be straight-forward. But there are some issues to overcome when saving (i.e. iframes will be problematic).

from textmarker.

AlphaHasi avatar AlphaHasi commented on June 29, 2024

ignore it -> close the topic -> 0 issues!

:)
thanks!

from textmarker.

ufb avatar ufb commented on June 29, 2024

:D I'll keep it open for now. There are a lot of things on the todo list but maybe I find the time some day to give it a go;)

from textmarker.

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.