Format html from single-line to multi-line with proper tabulation

Started by Kluyg, October 21, 2010, 09:48:03 AM

Previous topic - Next topic

Kluyg

Is there such functionality in HippoEdit or some of its plug-ins?
I have a string:
<table cellpadding='0' cellspacing='0' style='font-size: 12px; margin-top: 3px;'><tr><td style='width: 100px; text-align: right; padding-right: 10px; vertical-align: top;'>Description:</td><td id='dedcriptionTd'><div id='dedcriptionDiv' style='margin-right: 10px'></div></td></tr><tr><td style='width: 100px; text-align: right; padding-right: 10px; vertical-align: top; padding-top: 10px;'>Reason:</td><td id='reasonTd' style='padding-top: 10px;'><div id='reasonDiv' style='margin-right: 10px'></div></td></tr><tr><td style='width: 100px; text-align: right; padding-right: 10px; padding-top: 10px; vertical-align: top;'>Aftermath:</td><td id='afterMathId' style='padding-top: 10px;'><div id='afterMathDiv' style='margin-right: 10px; margin-bottom: 10px;'></div></td></tr></table>
I want a tool to format it to something like this:

    <table cellpadding='0' cellspacing='0' style='font-size: 12px; margin-top: 3px;'>
        <tr>
            <td style='width: 100px; text-align: right; padding-right: 10px; vertical-align: top;'>
                Description:
            </td>
            <td id='dedcriptionTd'>
                <div id='dedcriptionDiv' style='margin-right: 10px'>
                </div>
            </td>
        </tr>
        <tr>
            <td style='width: 100px; text-align: right; padding-right: 10px; vertical-align: top;
                padding-top: 10px;'>
                Reason:
            </td>
            <td id='reasonTd' style='padding-top: 10px;'>
                <div id='reasonDiv' style='margin-right: 10px'>
                </div>
            </td>
        </tr>
        <tr>
            <td style='width: 100px; text-align: right; padding-right: 10px; padding-top: 10px;
                vertical-align: top;'>
                Aftermath:
            </td>
            <td id='afterMathId' style='padding-top: 10px;'>
                <div id='afterMathDiv' style='margin-right: 10px; margin-bottom: 10px;'>
                </div>
            </td>
        </tr>
    </table>

alex

Hi Kluyg,

this currently not available with any buil-in functions and plug-ins. But maybe I will add some formatting functionality if I will do HTML extension plugin for HE. Until then you can use external tools to do the work. For example call xml/html tidy for current document as external tool passing parameters in command line.
Some more info about the topic can be found [url=http://in this post]in this post[/url].

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]