Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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