Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

auto indenting in dreamweaver cs6

Explorer ,
Jun 02, 2012 Jun 02, 2012

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>

 Visionary & Dreamer
26.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 02, 2012 Jun 02, 2012

Edit > Preferences > Code Format

Make sure the Indent box is checked.

indent-dw.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 03, 2012 Jun 03, 2012

Hi

this otion is checked already and below is the code i get

<body>

<table>

<th></th>

</table>

</body>

</html>

Screen Shot 2012-06-04 at 9.44.13 AM.png

 Visionary & Dreamer
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2012 Jun 03, 2012

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2012 Jun 04, 2012

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/

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 29, 2012 Jun 29, 2012

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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 08, 2013 Jan 08, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines