homepage Welcome to WebmasterWorld Guest from 54.225.24.227
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
HTML Tidy: Uses & Customizations
HTML Tidy, it's not just about pretty code.
papabaer




msg:936010
 8:06 pm on Jul 23, 2002 (gmt 0)

One of the included utilities in Macromedia's Homesite Editor is Dave Raggett's HTML Tidy (now an open source project). Tidy also ships with a number of other programs; it is also available as a free download.

I love this program. For me, it is a great time saver: it inserts my <!doctype> of choice and formats my HTML to my specifications. I admit it: I like (love!) pretty code!

What some users might not realise is that HTML Tidy can be custom configured. You can even open the .tdy files and edit changes directly.

Here is my custom xhtml.tdy:

markup:yes
wrap:100
tab-size:1
indent:auto
indent-spaces:2
hide-endtags:no
input-xml:no
output-xml:no
output-xhtml:yes
char-encoding:ASCII
numeric-entities:no
quote-marks:no
quote-ampersand:yes
quote-nbsp:no
wrap-script-literals:no
uppercase-tags:no
break-before-br:no
uppercase-tags:no
uppercase-attributes:no
clean:no
write-back:yes
show-warnings:yes
split:no
add-xml-pi:yes
doctype:STRICT
fix-backslash:no
wrap-asp:yes
drop-font-tags:no
word-2000:no
tidy-mark:no
wrap-attributes:no
wrap-jste:no
wrap-php:no
assume-xml-procins:yes
logical-emphasis:no
drop-empty-paras:no
enclose-text:yes
fix-bad-comments:yes
keep-time:no
quiet:no
alt-text:
error-file:TidyOut.log
new-inline-tags:
new-blocklevel-tags:
new-empty-tags:<br />
new-pre-tags:
logerrors:yes
runsilently:no

/* end example */

I have several, though I tend to use this one most of the time. There are other methods to customize Tidy, but this works best for my usage. I would like to know what your opinions are and what customizations you might use.

Besides formatting code, Tidy also fixes many common, and some not so common, coding errors. I use it well before sending a page to the W3C Validator. Pretty AND useful! What a combination! ;)

 

theboyduck




msg:936011
 9:17 pm on Jul 23, 2002 (gmt 0)

I'm an HTML tidy fan too - well sort of. I actually use JTidy which is a Java port of the original HTML tidy. I tend to use it as a plugin with jedit. The great thing about this is that because jedit is cross-platform you can use the same familiar editor for all your coding on Windows, Linux, Mac, etc..

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved