Have you ever had a big chunk of messy HTML code that you wished were properly indented? I did, so I wrote a little JavaScript page to clean up the indenting. Presenting:
Jon's HTML/XML Indenter.
This just uses a bit of JavaScript to properly indent whatever HTML you paste into the upper box.
This is a useful utility. Could you give the option of specifying the indentation amount? I prefer indenting 2 spaces myself. :)
ReplyDeleteJohan - Great idea! Done.
ReplyDeleteIt works great. I use so many web pages that I need to reformat but I don't have hours of time to spare to do that. :) You app will help a great deal. Thanks.
ReplyDeleteSuper!
ReplyDeleteWell done! But who should use it over HTML Tidy?
ReplyDeleteTidy's a good choice - but if it changes your code too much, this is a good simple alternative.
ReplyDeleteGood stuff! I just used this to clean up some xsl-stuff that was getting out of hand.. :)
ReplyDeleteOnly one feature-request, could you add an option for "Indent only" that disables line-breaking? In its current version your application breaks <xsl:attribute name="font-family">Helvetica</xsl:attribute> into:
<xsl:attribute name="font-family">
Helvetica
</xsl:attribute>
For my specific purpose it would be better if the application never split or wrapped lines.
Thanks! :-)
thank you SO MUCH for creating this! I tried downloading/installed various apps for textpad but your little tool works faster, easier and better!
ReplyDeletemany thanks :-D
Anon - You're welcome!
ReplyDeleteHow about an updated location or version we can download?
ReplyDeleteWhen I get some time I will move this to another server.
ReplyDelete