Solved

Indenting in Code View

Posted on 2004-04-07
10
623 Views
Last Modified: 2010-04-25
Below is a sample of what I see looking at the code in Dreamweaver Ultradev 4.01 - obviously unmanagable.  How can I get it formatted into a legible form w/ the expected indentation?

I've already tried Commands -> Apply source formatting and this does not appear to do anything at all.

In Edit -> Preferences -> Code Format I have checkmarks next to all of the 'Indent' options and I have no Automatic Wrapping selected.

I've just installed a few days ago on WinXP Pro machine.  Previously was using on Win2k machine and had no problems.  

Is this an XP compatibility problem?  Do I have a setting screwed up?  I'm going nuts here - any help would be much appreciated!

What I want:
---------------------------
<table>
   <tr>
      <td>Content
      </td>
  </tr>
</table>

What I have:
---------------------------
<tr> <td height="25" valign="MIDDLE" COLSPAN="12" BGCOLOR="#c5d8f0" CLASS="normaltextlarge" ALIGN="CENTER">Disposable
Commitment</td></tr><tr VALIGN="MIDDLE"><td height="25" WIDTH="26">&nbsp;</td><td ALIGN="CENTER" COLSPAN="2">&nbsp;</td><td ALIGN="CENTER" WIDTH="54" CLASS="normaltextxtrasmall">Current<BR>Units</td><td WIDTH="54" ALIGN="CENTER" CLASS="normaltextxtrasmall">Commit<BR>Units</td><td ALIGN="CENTER" WIDTH="54" CLASS="normaltextxtrasmall">Base<BR>Price</td><td ALIGN="CENTER" WIDTH="54" CLASS="normaltextxtrasmall">Fee
Per<BR>Unit</td><td WIDTH="54" ALIGN="CENTER" CLASS="normaltextxtrasmall">Net<BR>Price</td><td ALIGN="CENTER" WIDTH="75" CLASS="normaltextxtrasmall">Extended<BR>Base
0
Comment
Question by:frodoman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 35

Expert Comment

by:mrichmon
ID: 10779037
One trick that may help is to go into design view and change some text - and even change it back.  This often causes DW to give some basic formatting to the code view.
0
 
LVL 14

Accepted Solution

by:
Esopo earned 500 total points
ID: 10780683
Seems to me there's something wrong with your DW. I can't think of a way to make it autoindent, I tried a few things in my MX, none worked.

I suggest you download some software to do the reformatting of the html, an example:
http://download.paessler.com/download/aspbeautify.zip (200k)

From the site:
ASPBeautify beautifies the server based VB Script source code of Active Server Pages (ASP) and HTML Files by reformatting the source code (code indention).
It features VBScript- and HTML-indention, automatic clipboard and multiple file beautifying (batch).
- The site: http://www.paessler.com/products/freeware
You can also find it here: http://www.ezgoal.com/house/allfiles.asp?L=A&Order=&Sort=&Step=237&computer+software

I haven't tried this software, exercise caution.

Best regards,

Esopo.
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 10783306
You can also try textpad at textpad.com  free download and colorcodes tags for easy coding.  It  autoformats almost anything that I have opend with it.


textpad.com
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 42

Author Comment

by:frodoman
ID: 10783959
Thanks for the comments so far.  I'm aware of other editors but am hoping for a DW fix.

I'm not asking for functionality that isn't there because everything worked fine on my Win2k machine.  Unfortunately I wasn't the one that did the original install there so I don't know if there were settings changed or what.  I did do the install when I moved to WinXP and I'm thinking that there is something configured incorrectly.

Anyone have any ideas?
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10784179
Well, often you can get results like this when a file is transferred from say a Mac operating system to a windows one using binary mode instead of ASCII - or even if you transfer from a web host that is not windows using Binary mode transfer.
0
 
LVL 42

Author Comment

by:frodoman
ID: 10784228
Good thought but that's not it.  

If I open up a file in notepad the old indented formatting is retained.  When I open it in DW it's fine until I start moving stuff around in design view - it's then that DW screws it up.
0
 
LVL 1

Expert Comment

by:tintedfish
ID: 10786297
There are a couple of known compatability issuses with Ultradev and XP. Have a search through he macromedia forums / knowledgebase, I'm fairly sure I have read of this very problem in there. and its solution.
0
 
LVL 42

Author Comment

by:frodoman
ID: 10786381
I have searched the forums and didn't find anything.  If you can point me to a link I'll be happy to give you the points!
0
 
LVL 1

Expert Comment

by:tintedfish
ID: 10786565
Cant find it just now, will have a look later.

Have you tried setting |edit|preferences|code format| indent off, then applying |commands|apply source formatting| to remove all formatting. Save the file. Then switch indent back on  (space and tab size set, overrides off?) and reapplying source formatting?
0
 
LVL 42

Author Comment

by:frodoman
ID: 10805554
Thanks to all for your efforts but unfortunately none of the suggestions have solved the problem.  Looks like I'm going to be stuck using a 3rd party editor for now...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem with updating record and sending email 3 219
Dreamweaver CS6 FTP issues 12 1,342
WordPress on local PC and hosted 11 151
Dreamweaver CS6 Audio File Autoplay Always Plays 2 121
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question