I heard from a reader the other day who complained that she could not get the files from the CD that accompanies my book to open on her Mac. I thought perhaps a few tips about using Text Edit, the Mac OS X text editor, in plain text mode might be in order.
There are two settings to check in the Preferences. First, look at the New Document preferences. If you want to use Text Edit to write brand new HTML files, you need to set this Preference for “Plain Text.”
If you don’t want to create new original HTML files, but merely want to open HTML files that you find on the CD (or elsewhere) in plain text, then click on the Open and Save button. Here you want to check “Ignore rich text commands in HTML files.”
Text Edit will both read and write HTML files successfully if you set the preferences this way.
6 thoughts on “Tip: Getting Text Edit to open an HTML file in plain text”
I have been teaching a web page design course using basic html coding. This year my school upgraded to OS X and I no longer have Simple Text available; thus I am using Text Edit for the students to enter their coding. I have found the solution on your site for saving Text Edit files as plain text and am able to save files that way. However that solution is only half of the story.
My new problem is that when the students try to return to their saved .html files after viewing their work in Safari, Safari somehow automatically overwrites the saved files, changes the icon to a Safari icon rather than a Text Edit icon ? and voila, students no longer have text to edit — only web pages to view.
Surely there is some way with these two programs to accomplish the viewing/editing process that has worked so well with SimpleText and IE.
The computer is set to open HTML documents in Safari. You can change the application you want to have open HTML documents using these steps.
1. Select the document in the Finder and choose File > Get Info.
2. Click “Open with” in the Info window.
3. Choose an application from the pop-up menu or choose Other to locate a different application.
4. To use the application you chose to open all similar documents (the same type as the current document and created by the same application), click Change All.
This will not affect web browsing, only the files you open from your own hard drive. If you have only used IE in the past, you are going to love Safari!
Oh my gosh this just saved me 20 min a week. Why I never thought to do this before is beyond me. Thanks!
Glad it helped.
It helped me too.