How to prevent auto-tag-completion on "search and replace" in Dreamweaver MX 2004
Posted on 2006-04-13
I'm using Dreamweaver MX 2004 to update some badly-marked-up HTML documents. My process is to use the Find/Replace feature to blow through whole directory trees of HTML and fix a few tags and issues at a time. It works quite well.
There is a particular problem that keeps coming up. I don't know if it's me, or if it's Dreamweaver. It would seem that when I attempt to "surround" a particular tag sequence with another tag, I don't get my desired results. Let me 'splain with an example:
Existing HTML looks like this:
<a name="target">Blah De Blah</a>
What I want the Replace feature to do is this:
<h2><a name="target">Blah De Blah</a></h2>
(I assumed that I would have to do that in TWO steps; using 'Add Before Start Tag', and then 'Add After End Tag' in my search/replace activity).
However, what I get when I search for '<a>' tags with a 'name' attribute of '[any_value]' and tell DW to 'Add a <h2> Before Start Tag' is this:
<h2></h2><a name="target">Blah De Blah</a>
Likewise, if I try 'Add After End Tag', I get:
<a name="target">Blah De Blah</a><h2></h2>
I've tried turning OFF the 'Auto Tag Completion' feature in Edit > Preferences > Code Hints, but that doesn't seem to have an effect on Search/Replace.
Any ideas on how I can fix this? I can't use a different version of Dreamweaver, and I really can't use another product (corporate bureaucracy at work here).