DHTMLdev.com — Dedicated to quality Web development articles and tutorials
Configuring Dreamweaver to Not Rewrite Your HTML PDF Print E-mail
Monday, 06 February 2006

Do you use Dreamweaver or HomeSite? Do you use HomeSite because it doesn't rewrite your code? I used to use only HomeSite. Now I use Dreamweaver for the additional CSS and JavaScript code hinting and syntax help. But I had to reconfigure a few options in Dreamweaver so it would behave with my HTML code.

Although Dreamweaver does a great job in general, it can rewrite some of your code when you open a document. Older versions of Dreamweaver also rewrote code when using the built-in WYSIWYG (What you see is what you get) editor. That is much less of a problem now, if a problem at all. I do not use the WYSIWYG but in brief testing it wrote very good HTML, so even if it did reformat some of my HTML, I probably wouldn't care. Dreamweaver 8 seems to do a very good job. Also, any changes to your HTML code that Dreamweaver made, if it changed your code, would probably benefit you, because it would be fixing syntax errors and deprecated HTML elements.

"Fine," you say, "but now how do I configure Dreamweaver to keep it's DLLs off my code?"

Turning Off Code Rewriting

To turn off code rewriting in Dreamweaver, use the Preferences dialog. Follow these directions and refer to the screenshot below, which also shows addtional options that I will discuss next.

  1. In Dreamweaver 8, click Edit»Preferences. The Preferences dialog window will appear.
  2. In the Category side menu, click Code Rewriting. The Code Rewriting options will appear.

    Some older versions of Dreamweaver might call this section HTML Rewriting

  3. In the Never rewrite code field, type the file extensions .htm and .html. Seperate extensions using a space character, for example: .htm .html.

Addtional Code Rewriting Options in Dreamweaver

The additional options Special Characters and URL encoding apply to code entered using Dreamweaver interface, such as the Properties panel. These options do not apply to any code you type yourself.

But they do apply to attribute value code, such a URLs, etc., that Dreamweaver writes on your behalf when you are using the Properties panel. I would accept Dreaweaver's rewrites because it escapes illegal characters that should not be in the text of the attribute values, such as spaces in URLs.

Last Updated ( Monday, 06 February 2006 )
 
< Prev