[thelist] Tweaking Dreamweaver code (was Homesite vs Dreamweaver)

Melissa Phelps Firestone liss at frameshift.com
Thu Mar 8 11:14:14 CST 2001


Like others have already mentioned, DW creates really bad nested tables if
you're not very careful in laying out the page's tables yourself and
avoiding all of DW's layer-conversion doo-dads. The behaviors codes are
almost useless because of their bloat legibility, for our use, and I'm
always manually entering and modifying doctype declarations and meta tags
(the default options are nowhere near robust enough). Most irritating is the
seemingly arbitrary application of styles - I'm never quite sure whether a
style is being applied to a div, a span, a td, a paragraph, or what, until I
try to modify or remove the style and find that I can't because it's been
applied to three different things, including insane nested spans and the
like.

That said, the thing that I find that _most_ time-sucking and annoying about
DW-generated code is its indent styles. I have modified the configuration
about as far as I can (I think) and I still spend ages lining up indents so
that I don't end up with something that looks like this:

[table...]
  [tr]
    [td]
    [/td]
    [td]
      [table]
        [tr]
          [td]
            [p][/p]
          [/td]
        [/tr]
      [/table]
    [/td]
  [/tr]
[/table]


...with indents going on to a ridiculous level (IMO).

What I want is a way to say "indent tr never unless inherited from the
table's indent; indent the td only if it is not the first td in the tr", and
"add a newline after the close tag of td and tr if the next tag is an opener
of the same container; otherwise, do not add a newline", like so:

[table...]
[tr][td]...[/td]
    [td]...[/td][/tr]
[tr][td...][/td][/tr]
[/table]

As it is, if I have to take someone's DW-generated code and work with it
enough that its readability is important, I spend much time in BBEdit's grep
functionality.

Hence, hand-coding is faster for me by a factor of probably four, since I
can easily type my indents and linebreaks and various tags much faster than
I can push around DW code. The designers and less fussy in my company are,
however, faster with DW than with hand-coding (not having been doing it for
6+ years now), so I'll be dealing with these issues for the foreseeable
future. 

Um, still glad you asked?
--Liss 

> I've been following this and the thread entitled WSIWYG editors with a great
> amount of interest. I've noticed that many of the list members that use
> Dreamweaver still find it necessary to tweak, clean and optimize the HTML
> code. Could you tell me which areas of the code do you find it necessary to
> make alterations to and why.





More information about the thelist mailing list