Solved

Indenting in Code View

Posted on 2004-04-07
10
619 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
  • 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now