Tuesday, June 20, 2006

Have Mac? Then have a free XHTML editor too!

From time to time, it would be nice to have an extremely fast, super lightweight application to create and update basic XHTML files.

Well, it tuns out - the Macintosh already does. I was taking a look at the TextEdit application Preferences dialog box today. What should I see? Lo! It is a pretty seriously powerful set of web-related document options.

TextEdit Preferences XHTML choice on Mac

The choices are great. The web related file formats for the default Save File preferences are awesome: Strict HTML, Transitional HTML, Strict XHTML, and Transitional HTML.

It does not stop there. You have 3 Styling choices: Embedded CSS, Inline CSS, and No CSS.


The fun does not stop there. As you know, the Macintosh has a system-wide spell-checkintg facility. So, you get that for free in your XHTML documents you are editing too.

Granted, it does not support quite every XHTML feature or tag. But it does support a lot.

You can even control line breaks. Turn them off on a swatch of text, for instance. I presume this emits the text wrapped in a pre tag.

Also, you can do lists, and control which enumeration/bullet numbering/lettering/marking prefaces each item in the list.

Text alignment (right, center, left, and justified) is also supported.

Now, granted the Mac comes with GNU Emacs. You could always load up nXML mode or one of the many other XML editors into Emacs. That is not exactly WYSIWYG though.

When you are in a hurry, dashing off some content and don't want to have to test–render it a few times, just write it, save it, send/store it - TextEdit could be quite the handy little trick to have up your sleeve. Right?

Of course, you do have to Learn your XHTML tags someday, if you have not already done so.

Ah, but that is another advantage of this trick. If you forget one or two, just create a document that uses their functional equivalent in TextEdit - and save it to XHTML. Then load in the document in plain text mode with it or any other editor - and see what XHTML elements & attributes (even CSS properties) were used.

Sweet, huh?

0 Comments:

Post a Comment

<< Home