Showing posts with label textedit. Show all posts
Showing posts with label textedit. Show all posts

Sunday, May 06, 2007

viewing and editing HTML source code in Mac TextEdit

Its been a loooong time since I've edited HTML on a Mac and I heard BBEdit is a great program. Unfortunately, it's $150, so I think I'll stick with TextEdit on the Mac. Using TextEdit though has an initial first hurdle to avoid. The idiotic default of TextEdit is to open up HTML files as rich text. Displayed as rich text, you can't see the HTML code in the file! Why would I want to display rich text by default in a text editor? The logic escapes me. Maybe Apple's developers will amend this in the next version of the software, as well as another pet peeve of mine I mention below.

First though, in order to get around the silly "rich text" default setting, when you open your HTML file, select File -> Open and be sure to select "Ignore rich text commands" as below:


You'll then see all the HTML in your file. Note: be sure to save your HTML from Safari as Format -> Page Source instead of Format -> Web Archive. Web Archive won't open properly in TextEdit.

To set this permanently in TextEdit, go to Preferences -> Open and Save -> select "Ignore rich commands in HTML files" as below:


While I'm ranting, another pet peeve of mine is Grab's inability to save to a browser-readable image format like JPEG or PNG. To capture images from a Mac for this blog, I'm forced to use Grab to save a screen capture of a window to a TIFF file and then open up Preview to convert the TIFF to PNG. This is stupid.

6/30/2007 Update: Ok. My apologies Apple Developers. I'm stupid. I did not see this feature in Preview:
/2007/06/screen-or-window-capture-in-mac-osx.html

Done ranting.
Feel free to drop me a line or ask me a question.