Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently created a .html file in TextEdit on my Mac (Mac OS X 10.5.8). I then opened that .html file in my browser and it showed the page I created just fine. I closed the .html file and TextEdit and refreshed the page. It still worked fine. Then I opened up the .html file in TextEdit again and all the text was gone (the page in the browser still works fine though). Where did all the text go?

share|improve this question

migrated from Feb 26 '10 at 21:23

This question came from our site for professional and enthusiast programmers.

This isn't really a programming question. Try – Mike Atlas Feb 26 '10 at 21:18
Agree with Mike. – Amy Feb 26 '10 at 21:19

Try selecting "Ignore rich text commands in HTML files" in the Open/Save section of TextEdit's preferences window.

Edit: after making sure this option is set, you'll likely need to re-open the file.

share|improve this answer

TextEdit was trying to render the page and present it rather than letting you edit the source. You should consider using a real editor.

share|improve this answer
textEdit is a Rich Text editor and will not always display the plain text output. An editor like TextWrangler might be better suited. – jweede Feb 26 '10 at 22:38
@jweede: TextEdit can be used as a plain text editor. However as you mentioned TextWrangler is much better suited. – Chealion Mar 18 '10 at 17:28

TextEdit is converting the HTML to rich text and displaying it as it is marked up by the tags. TextEdit is considered a rich text editor and not suitable for HTML or coding use.

You should use a raw text editor like TextWrangler or TextMate if you plan on doing coding or html work.

share|improve this answer

You must log in to answer this question.