Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Can Dreamweaver automatically re-format existing code?


  • Please log in to reply

#1
stearmandriver

stearmandriver

    Member

  • Member
  • PipPip
  • 67 posts
Hi,

I've inherited a mess of a website. It seems to have been built with an old WYSIWYG editor that wrote code kind of randomly, and it's hard to read through. Does anyone know if there's an option in DW CS3 that will automatically fix this, and create a series of indentations based on the nesting of different elements? It's a small thing, but would sure be convenient.

I know DW will auto-indent new code that I write, I'm just curious about pre-exising stuff like this.

Thanks,
Joe
  • 0

Advertisements


#2
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Dreamweaver is not much at correcting code to HTML 4.01/CSS 2.1 Standards. You might try HTML Tidy found in some of the free HTML Editors, but if the errors are really bad, you will have to do those by hand.

You might use the following validators to get an idea of coding errors:

HTML Validator
CSS Validator
Link Checker

Use the "More Options", "Verbose" output where available.
  • 0

#3
stearmandriver

stearmandriver

    Member

  • Topic Starter
  • Member
  • PipPip
  • 67 posts
Thanks Major... it's not so much syntax I was wondering about correcting, but the actual structure of the code. This stuff actually mostly validates, with just a few errors I'm working my way through. The syntax is ok... the code is just scattered everywhere. I was hoping there was something to re-order it into readable chunks, with indenting showing the nesting of elements. If not, no big deal, I'll survive. :)

Thanks...
Joe
  • 0

#4
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
I re-order mine using Copy/Fine/Replace function in my HTML Editor when a page's code is all over the place. Where I can't use that method, then I take it line by line using the Delete button until code is blocked out to where it is readable. All this has to be done manually although you could try HTML Tidy and let it correct/restructure the code for you. I don't really like the way HTML Tidy corrects code, but it is better than nothing.

Edited by Major Payne, 23 September 2008 - 03:31 PM.

  • 0

#5
stearmandriver

stearmandriver

    Member

  • Topic Starter
  • Member
  • PipPip
  • 67 posts
Thanks, I'll check it out.
  • 0

#6
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
You're welcome. Give a shout if you need more info concerning this problem.
  • 0

#7
ykpuiacur

ykpuiacur

    New Member

  • Member
  • Pip
  • 1 posts
You can try VS2005/8/10.

They can re-format code.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP