Search stack for document


(Julien Vogels) #1

I’m looking for a stack that does the same thing as the cmd F in a document


(Will Woodgate) #2

As I explained in my email reply already to you, emulating the CMD + F functionality in web browsers would be a fruitless exercise. Worst still; the method of removing / adding text strings to the DOM (to wrap search results in styled <span> tags) is likely going to cause a huge number of complicated breakages and various other compatibility / accessibility problems. For which I fear you might not have the time or skillset to overcome.

If you need to sort a product inventory, the official Filter stack is the best way to go. With this stack, you can have users click predefined buttons or type in category boxes to search for specific keywords. The aptly named SortStack is another option for simply rearranging items on screen too.

Then you also have powerful table stacks like GridIron from @barchard which can let you filter / sort tabular data through means of a search box or clicking table headings.

You will find that all these stacks are far better optimised for sorting / adding / removing things from display. They are scoped to these particular parts of the webpage, so will not cause mass breakage with other things elsewhere on your webpage.

You can imagine a user searching the word ‘play’. The search box highlights the play button inside a video player and wraps it inside other HTML. Then the video player can no longer find its play button and throws a Javascript error. This in-turn starts breaking everything else in the webpage. Within a matter of seconds, the webpage has descended into total anarchy! Whereas your conventional CMD + F browser function does not touch the DOM - it’s entirely software driven. Plus it will give you buttons to skip backwards / forwards and bring highlighted words into focus. It is already perfect and does everything you want. Don’t reinvent the wheel and make things unnecessarily more complicated than they need to be.


(Greg Schneck) #3

Julien…Preview the RW page and in the web browser do a “find.”

It won’t take you to where you need go in RW but it will at least show you the location of your search term. I have some pages that are extremely long (very long text stacks) and the client will often give a change to a page without saying where. (“Change Joe Smith to Jane Black”). A quick preview and search of the RW page at least shows me where “Joe Smith” is so I can find it in the 1200 word stack!


(system) #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.