Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,099
    Thanks
    297
    Thanked 12 Times in 12 Posts

    Exclamation is it possible to get dreamweaver to break up a blocks of code within dreamweaver?

    Hi All,

    This is a longshot but you never know

    I have quite alot of code which has been generated from an online calendar generator the problem is its all in blocks of code and is hard to follow.

    example of html code in dreamweaver cs3

    Code:
    <table border="1">
    <tr><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th></tr>
    <tr><td><span class="date">&nbsp;</span></td><td><span class="date">&nbsp;</span></td><td><span class="date">&nbsp;</span></td><td><span class="date">1</span></td><td><span class="date">2</span></td><td><span class="date">3</span></td><td><span class="date">4</span></td></tr>
    <tr><td><span class="date">5</span></td><td><span class="date">6</span></td><td><span class="date">7</span></td><td><span class="date">8</span></td><td><span class="date">9</span></td><td><span class="date">10</span></td><td><span class="date">11</span></td></tr>
    <tr><td><span class="date">12</span></td><td><span class="date">13</span></td><td><span class="date">14</span></td><td><span class="date">15</span></td><td><span class="date">16</span></td><td><span class="date">17</span></td><td><span class="date">18</span></td></tr>
    <tr><td><span class="date">19</span></td><td><span class="date">20</span></td><td><span class="date">21</span></td><td><span class="date">22</span></td><td><span class="date">23</span></td><td><span class="date">24</span></td><td><span class="date">25</span></td></tr>
    <tr><td><span class="date">26</span></td><td><span class="date">27</span></td><td><span class="date">28</span></td><td><span class="date">29</span></td><td><span class="date">30</span></td><td><span class="date">31</span></td><td><span class="date">&nbsp;</span></td></tr>
    </table>
    that is for 1 month there are 12

    i''ve been manually going through the months and getting the code to look like this

    Code:
    <table border="1">
    <tr>
    	<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>
    </tr>
    <tr>
    	<td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">1</span></td>
        <td><span class="date">2</span></td>
    </tr>
    <tr>
    	<td><span class="date">3</span></td>
        <td><span class="date">4</span></td>
        <td><span class="date">5</span></td>
        <td><span class="date">6</span></td>
        <td><span class="date">7</span></td>
        <td><span class="date">8</span></td>
        <td><span class="date">9</span></td>
    </tr>
    <tr>
    	<td><span class="date">10</span></td>
        <td><span class="date">11</span></td>
        <td><span class="date">12</span></td>
        <td><span class="date">13</span></td>
        <td><span class="date">14</span></td>
        <td><span class="date">15</span></td>
        <td><span class="date">16</span></td>
    </tr>
    <tr>
    	<td><span class="date">17</span></td>
        <td><span class="date">18</span></td>
        <td><span class="date">19</span></td>
        <td><span class="date">20</span></td>
        <td><span class="date">21</span></td>
        <td><span class="date">22</span></td>
        <td><span class="date">23</span></td>
    </tr>
    <tr>
    	<td><span class="date">24</span></td>
        <td><span class="date">25</span></td>
        <td><span class="date">26</span></td>
        <td><span class="date">27</span></td>
        <td><span class="date">28</span></td>
        <td><span class="date">29</span></td>
        <td><span class="date">30</span></td>
    </tr>
    <tr>
    	<td><span class="date">31</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
        <td><span class="date">&nbsp;</span></td>
    </tr>
    </table>
    much easier to follow

    but i was wondering if there was a way within dreamweaver to get it to add new lines at certain points to save me time?

    if so its something that would save time on other projects too

    thanks

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,989
    Thanks
    56
    Thanked 557 Times in 554 Posts
    I haven't used dreamweaver for a long time, so I don't know what it can do now, but you can "beautify" that html by pasting it here

    and it gives you a format like

    Code:
    <table border="1">
        <tr>
            <th>Mon</th>
            <th>Tue</th>
            <th>Wed</th>
            <th>Thu</th>
            <th>Fri</th>
            <th>Sat</th>
            <th>Sun</th>
        </tr>
        <tr>
            <td><span class="date">&nbsp;</span>
            </td>
            <td><span class="date">&nbsp;</span>
            </td>
            <td><span class="date">&nbsp;</span>
            </td>
            <td><span class="date">1</span>
            </td>
            <td><span class="date">2</span>
            </td>
            <td><span class="date">3</span>
            </td>
            <td><span class="date">4</span>
            </td>
        </tr>
        <tr>
            <td><span class="date">5</span>
            </td>
            <td><span class="date">6</span>
            </td>
            <td><span class="date">7</span>
            </td>
            <td><span class="date">8</span>
            </td>
            <td><span class="date">9</span>
            </td>
            <td><span class="date">10</span>
            </td>
            <td><span class="date">11</span>
            </td>
        </tr>
        <tr>
            <td><span class="date">12</span>
            </td>
            <td><span class="date">13</span>
            </td>
            <td><span class="date">14</span>
            </td>
            <td><span class="date">15</span>
            </td>
            <td><span class="date">16</span>
            </td>
            <td><span class="date">17</span>
            </td>
            <td><span class="date">18</span>
            </td>
        </tr>
        <tr>
            <td><span class="date">19</span>
            </td>
            <td><span class="date">20</span>
            </td>
            <td><span class="date">21</span>
            </td>
            <td><span class="date">22</span>
            </td>
            <td><span class="date">23</span>
            </td>
            <td><span class="date">24</span>
            </td>
            <td><span class="date">25</span>
            </td>
        </tr>
        <tr>
            <td><span class="date">26</span>
            </td>
            <td><span class="date">27</span>
            </td>
            <td><span class="date">28</span>
            </td>
            <td><span class="date">29</span>
            </td>
            <td><span class="date">30</span>
            </td>
            <td><span class="date">31</span>
            </td>
            <td><span class="date">&nbsp;</span>
            </td>
        </tr>
    </table>
    which seems to be closer to what you want


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •