Invoke Find/Replace dialog box

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Deepti
Posts: 4
Joined: Fri Jul 08, 2022 1:35 pm

Invoke Find/Replace dialog box

Post by Deepti »

Hi Team,
Is there a way to invoke Find/Replace dialog box with pre-defined fields from JS API? If else how to invoke the same.
Thanks in advance.
mihai_coanda
Posts: 78
Joined: Wed Jul 20, 2016 8:22 am

Re: Invoke Find/Replace dialog box

Post by mihai_coanda »

Hello,

We offer an API to open a document with the search triggered automatically with custom values for the search form using search loading options [1] [2]: search.find, search.replace, search.matchCase, search.wholeWords.

If this does not cover your use case you can detail the scenario you are trying to cover for us to understand better and possibly come up with a solution.

Best Regards,
Michael

1. https://www.oxygenxml.com/maven/com/oxy ... ingOptions
2. https://www.oxygenxml.com/doc/versions/ ... %2Coptions
Michael

https://www.oxygenxml.com
Deepti
Posts: 4
Joined: Fri Jul 08, 2022 1:35 pm

Re: Invoke Find/Replace dialog box

Post by Deepti »

Hi,

For ex: I want to find elements by tag...user will enter tags and we need to list the matching tags in dialog and then on click of that, particular element must be selected and highlighted.

Thanks in advance.
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Invoke Find/Replace dialog box

Post by mihaela »

Hello,

The Find/Replace action from Web Author can be used only to find and replace content in the current document. You cannot use this dialog to find elements by tag name or by attributes.
To implement such an action you can use the API. There are some discussion threads for the same use-case, with information about the implementation:
common-problems/topic24459.html
post66453.html#p66453

Please let us know if you need further details.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply