Skip to main content
Inspiring
April 15, 2019
Question

dreamweaver.findNext() does not highlight/select matches in CC 2019

  • April 15, 2019
  • 1 reply
  • 609 views

According to the description of dreamweaver.findNext() in https://helpx.adobe.com/dreamweaver/apiref/find-replace-functions.html#dreamweaver_setupfind, the matched result should be selected.

Finds the next instance of the search string that was specified previously by dreamweaver.setUpFind(), by dreamweaver.setUpComplexFind(), or by the user in the Find dialog box, and selects the instance in the document.

Currently, after the calling of following code, matched result is not selected/highlighted.

dreamweaver.setUpFind({searchString: "AAA", searchWhat: "document", matchCase: false, matchWholeWord: false, useRegularExpressions: false, searchSource: true});

dreamweaver.findNext();

This topic has been closed for replies.

1 reply

Nancy OShea
Community Expert
Community Expert
April 15, 2019

I'm not sure what you're doing or expecting.

Here I used Ctrl+Shift+F to Find a class name called "carousel-caption" in my current document.

When I click Find All, I see several results in the Search panel.  

When I double click on the first result, the string is highlighted as shown in my screenshot.

Unless I'm missing something, that is the expected behavior in DW CC 2019.

Nancy O'Shea— Product User & Community Expert
Eric DWKJAuthor
Inspiring
April 16, 2019

Hi Nancy,

I'm creating an extension of Dreamweaver with JavaScript. dreamweaver.findNext() doesn't work as expected according to Find and replace functions.

I also tried following code with no lucky.

 dreamweaver.setUpComplexFind('<dwquery> \
  <queryparams matchcase="false" ignorewhitespace="false" useregexp="false" wholeword="false" textonly="false" /> \
  <find searchmode="document"> \
    <qtext qname="AAA" qraw="true" qtagname="[any tag]"></qtext> \
  </find> \
</dwquery>)';
 dreamweaver.findNext();

And the dreamweaver.setUpComplexFindReplace() together with dreamweaver.replace() can work.

 dreamweaver.setUpComplexFindReplace('<dwquery> \
  <queryparams matchcase="false" ignorewhitespace="false" useregexp="false" wholeword="false" textonly="false" /> \
  <find searchmode="document"> \
    <qtext qname="AAA" qraw="true" qtagname="[any tag]"></qtext> \
  </find> \
  <replace action="replaceText" param1="BBB" param2=""/> \
</dwquery>)';
 dreamweaver.replace();

It should be a bug of dreamweaver.findNext(); or together with setUpComplexFind/setUpFind.