Page 1 of 1
Invoke Find/Replace dialog box
Posted: Mon Jul 11, 2022 4:48 pm
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.
Re: Invoke Find/Replace dialog box
Posted: Tue Jul 12, 2022 1:30 pm
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
Re: Invoke Find/Replace dialog box
Posted: Tue Jul 12, 2022 3:13 pm
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.
Re: Invoke Find/Replace dialog box
Posted: Wed Jul 13, 2022 2:07 pm
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