Skip navigation
Currently Being Moderated

auto indenting in dreamweaver cs6

Jun 2, 2012 5:11 AM

Tags: #dreamweaver

why the code dont auto indent in dreamweaver i use the latest cs6, as an example the table code below it

should indent the tr tag some spaces more than the parent table tag but it dont i need to do it manually so am i missing something ?

 

<table>

<tr>

<td>15</td>

<td>15</td>

<td>30</td>

</tr>

<tr>

<td>45</td>

<td>60</td>

<td>45</td>

</tr>

<tr>

<td>60</td>

<td>90</td>

<td>90</td>

</tr>

</table>

 
Replies
  • Currently Being Moderated
    Jun 2, 2012 5:25 AM   in reply to AmmarSM

    Edit > Preferences > Code Format

     

    Make sure the Indent box is checked.

     

    indent-dw.png

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 3, 2012 11:59 PM   in reply to AmmarSM

    Sorry, don't know any other settings.

     

    For me, if I check that option, I get indented code.

     

    If I don't check it, the code is left aligned.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 4, 2012 12:19 PM   in reply to AmmarSM

    Edit > Preferences > Code Format > hit Tag Library button for advanced features. See screenshot:

     

    CS6-code-tag-editor.jpg

     

    Code formatting changes won't effect your exisiting code.  Only works on new code.

     

     

    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists 

    http://alt-web.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 6:36 PM   in reply to Nancy O.

    With CS5 is the same, non of these settings have worked, but go to:

     

    C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS5\configuration\Commands\TableCommands.js

     

    and 39-41 lines add some spaces bofere <

     

    var tableCells='  <'+'TD>' + theNBSP + '<'+'/TD>\n';

    var tableScopeRowCells='  <'+'TH>' + theNBSP + '<'+'/TH>\n';

    var tableScopeColCells='  <'+'TH>' + theNBSP + '<'+'/TH>\n';

     

    this have worked, but if you try to insert new row <td> is not indented:

     

    <table cellspacing="0" cellpadding="0">

    <tr>

      <th> </th>

      <th> </th>

    </tr>

    <tr>

      <td> </td>

      <td> </td>

    </tr>

    <tr>

    <td>new row</td>

    <td>not indented</td>

    </tr>

    </table>

     

    and didnt have found how to fix insert new row (below or above same is not indented).

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 8, 2013 4:34 PM   in reply to Tomas...

    Just go into Preferences, Code Formating, and then the Tag Libraries. Find the TAG and change the line break setting to add line breaks for the before, inside, or after conditions.

     

    After making the change, in Code View click: Format Source Code.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points