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 10 of 10
  1. #1
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting (indentation, etc) messy html code... a handy (free) tool?

    I was using http://valet.htmlhelp.com/tidy/ for this but lately it's returning blank pages for me. I would like to find a tool either online or downloadable that will format html code and do the proper indentations, etc... ideally the choice to either load a file or paste in a block of code would be ideal, but one or the other would suffice.

    Does anyone know of any other tools besides the one mentioned above?

    Thanks in advance. (I've googled this and that's how I found "tidy" but I didn't find anything else useful.)

    I have Dreamweaver CS4 if there is anything that can add-on to that or is built in that I haven't found.

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by WebKitty View Post
    I was using http://valet.htmlhelp.com/tidy/ for this but lately it's returning blank pages for me. I would like to find a tool either online or downloadable that will format html code and do the proper indentations, etc... ideally the choice to either load a file or paste in a block of code would be ideal, but one or the other would suffice.

    Does anyone know of any other tools besides the one mentioned above?

    Thanks in advance. (I've googled this and that's how I found "tidy" but I didn't find anything else useful.)

    I have Dreamweaver CS4 if there is anything that can add-on to that or is built in that I haven't found.
    DW has a feature in the Commands menu..."Apply Source Fomatting" that indents code.
    Teed

  • #3
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! Unforutnately that means I have to rename about 100 templates from .txt to .html to get it to work...oy... but thanks!

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by WebKitty View Post
    Thanks! Unforutnately that means I have to rename about 100 templates from .txt to .html to get it to work...oy... but thanks!
    You didn't specify you were working with .txt files. But I'm confused. Aren't these html files? or will be?

    You said...

    I would like to find a tool either online or downloadable that will format html code
    So they should already be .html files correct??
    Teed

  • #5
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Long shot here... is there any way to edit HOW it formats the html code? It isn't indenting certain things I'd like indenting, etc... I'd like a little more control if possible.

  • #6
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    You didn't specify you were working with .txt files. But I'm confused. Aren't these html files? or will be?
    They're template chunks from the backend of a CMS called textpattern. I have them backed up on my computer as .txt files because it's easiest to edit them in notepad, so I wanted something that opened them natively in notepad. In the CMS they are just "form templates" and "page templates" and have no file extensions.

    The CMS compiles all of these various template pieces as chunks of code when you call them as includes (basically) in the pages. Each snippet of code is html code, but isn't a page or anything (with html and body tags, etc) and as I said, I wanted to easily be able to edit my backups in notepad.

  • #7
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    You know notepad edits html files as well. I mean you dont have to store them as .txt files for the sole purpose of keeping back ups and editing them in notepad.
    Teed

  • #8
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know but if I double click on an html file it opens in a browser, so txt seemed easier.

  • #9
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    (And I don't want to set notepad as the default for html files--I want a browser for that. So I wanted something I could easily double click on and have it open in Notepad... unless you know of a workaround that would make me able to quickly open an .html file in Notepad without changing the default program?)

    Actually I suppose I could just open Dreamweaver every time I want to edit those files... it just seems like a big hammer for a little nail, if you know what I mean lol. These snips are things like this (or somtimes even shorter, though sometimes much longer as well):

    Code:
    <!-- begin form menu_searchbox -->
    	<div class="leftscroll">
    	<div class="topscroll">
    	<div class="bottomscroll">
    
    <!-- search form -->
    <p><!-- --></p>
    	 <div id="searchform2"><txp:search_input /></div><!--searchform2-->
    
        </div><!--bottomscroll-->
        </div><!--topscroll-->
        </div><!--leftscroll-->
    <!-- end form menu_searchbox -->
    (I put a comment begin/end tag in every form that I do, because otherwise if there is a problem on the page, and I view source, it's really, really hard to pinpoint what form I need to edit to fix the problem area.)

  • #10
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If I decide to start editing them in Dreamweaver... I found this method for batch renaming file extensions: http://www.addictivetips.com/windows...ns-in-windows/ --super cool if I don't have to do it by hand.

    The article is from 2008 so I don't know if it still works, but I can give it a try...


  •  

    Posting Permissions

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