Thread:Kangaroopower/@comment-3508190-20120413185323/@comment-3508190-20120419021610

I think the dialog should give some feedback: "match 11 of 20" or: "made 17 replacements" That sort of thing. For that you would need countMatches.

A dedicated replaceAll function would be faster than looping over the matches with next or prev and replacing them individually.

My idea was to split the code over several modules that can be loaded concurrently, edited independently and are only loosely coupled. The shadow module would be the one that handles the textarea and the search/replace engine. FindReplace would then be the namespace for all those modules.

There should be four or five modules:


 * 1) the Shadow module
 * 2) the dialog module
 * 3) maybe(!) a separate module for the toolbar changes
 * 4) a pseudo-module for w:c:dev:textinputs_jquery.js
 * 5) and a pseudo-module for jQuery UI