textedit, file extension get converted to ".txt"

Discussion in 'Mac OS X Lion (10.7)' started by darakok, Oct 2, 2011.

  1. darakok macrumors newbie

    Jul 21, 2010
    I use textedit in Lion to create html source file. When I save it, i specify and html extension.

    I close the file. Open it again and do another save. this time the extension is converted automatically to .txt. So strange for me.

    In the preference, I've set the "Ignore rich text command in html" and set the new document format to plain text.

    So can somebody help explain why my file extension get converted to ".txt" when i save my file a second time onward.

    /dara kok
  2. lighthouse_man, Oct 2, 2011
    Last edited: Oct 2, 2011

    lighthouse_man macrumors 6502a

    Mar 13, 2005
    If you want to edit HTML, I suggest you try TextWrangler. It's free as is its hassle.

    You should uncheck "Add .txt extension to plain text files" under "when saving a file"
    However if it doesn't work, one thing you can do is open the info window of your file in finder and change the extension to html and it should work.
  3. darakok thread starter macrumors newbie

    Jul 21, 2010
    Hi, Thanks for the comment.

    I don't have the "add txt extension" enabled. And even after i change the file extension using the info window from txt to html. whenever i reopen the file and choose save again. The extension will get renamed to ".txt". Very funny.

    I've never noticed such behavior when i was using Snow leopard.
  4. Mal macrumors 603


    Jan 6, 2002
    I second the TextWrangler suggestion, it'll make things much easier on you. It's free, too.

  5. dumb macrumors member

    Nov 1, 2009
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5)

    Had the same problem, so once i wrote the html, and tried to open with safari/firefox. it would show the source/text instead of rendering it as a web page.

    I ended up saving a webpage from firefox, as .html by default and then removed that source code with my code.

Share This Page