Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Feb 26 '10 at 21:23

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

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

3 Answers

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.