picnictutorials — 2012-01-16T10:19:24-05:00 — #1
How to remove white space while "find and replace" to remove code in Dreamweaver?
Hello. I just want to remove a single line of code from all my documents. Using find and replace works fine but it leaves the white space in its place. Is there anyway to remove that white space along with the line of code? Thanks!
jason__c — 2012-02-09T08:42:34-05:00 — #2
From personal experience with CS4, I have never heard of Dreamweaver having that feature, at least CS4. I would just run the page through a free editor that has that function. You would think Dreamweaver would do it anyway.
riccknight — 2012-02-09T09:09:28-05:00 — #3
Paste the text in as unformatted text. This prevents the white spaces in your document but it means having to reformat all of the content as you will lose all the bolding, bullets, paragraphs, line breaks and italics from the original document. Not fun on a large document!
mainstwebguy — 2012-03-28T13:12:15-04:00 — #4
I have had to do this a bagillion times with different sites and have found a decent way that works for me. Consider the following:
... more random content...
What I do to remove the div called "removeDiv" in this case, is highlight everything from the </div> of the div "someDiv" all the way through the opening of the "footer" div. Now paste that into your find window.
in the replace window, simply replace it with the </div> from "someDiv" and the opening of "footer" div with no space inbetween.
Choose replace all and make sure in the options of the find and replace are set to "source code" and entire current local site" and you should get something like:
</div> <!-- from the "someDiv" -->
This works for me in dreamweaver CS4 and has worked great for the most part since Dreamweaver 8.
hope this helps.