Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Saving .html files in TextEdit with OSX Lion

HELP!!!


Just upgraded to Lion.


When i paste html code into TextEdit and save as .html, the moment i edit and save that same file it automatically changes the extension of the file from .html to .txt..how do i turn this off so that it saves it as .html?? in Snow Leopard it never did this.


Many Thanks.

MacBook Pro, Mac OS X (10.6.6)

Posted on Jul 22, 2011 4:09 PM

Reply
38 replies

Sep 16, 2011 12:44 PM in response to Sherwin Arae

I figured out an easier workaround for this.

Create the .html file as usual, change it to plaintext and all that and save it as a .html file. Once you have it saved, open the file with Xcode (I used Xcode 4) and you can edit the file from there, save it and refresh it within the browser to reflect your changes. Saving it saves to the original file and doesn't change the extension. Nice and quick for checking your work. I know you don't get to work in textedit but you can do everything you need to in Xcode instead.

Hope this helps some people as it was quite annoying for me.

Oct 4, 2011 1:07 AM in response to Sherwin Arae

I'm running the developer release of 10.7.2 and it hasn't been fixed yet. It's annoying that it keeps changing the extension name back to txt. I like to save and check changes right after each change/addition before I move on to the next part of the document. Now I have to manually rename after each page update to check my page results.

Nov 27, 2011 11:14 AM in response to Sherwin Arae

Some people have said that this is a bug, but I think it's a bit of poor design. However, try the following.


Firstly use

Format -> Make Plain Text


If that option is not available, then it's already a plain text document

And the software will be offering Make Rich Text these options are a toggle


Secondly


File -> Save As


And untick the box - Hide extension (this isn't essential but helps you to see what you have"


Leave Unicode (UTF-8) selected


And lastly


In the Save As: box - enter your filename and end it with ".html"

If the Save As: box has already appended ".txt" to the filename replace it with ".html"


I hope this helps (it's not perfect I know) but it's the easiest way I've found.

Saving .html files in TextEdit with OSX Lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.