Languages

Archived - Mac OS X: How to Set Up TextEdit as an HTML or Plain Text Editor

TextEdit renders HTML by default. You may change its preferences to act as a plain text editor, for use in editing HTML or configuration files, for example.
This article has been archived and is no longer updated by Apple.
Symptom

You expect TextEdit to open your HTML file in plain text form for editing, but it renders the file into its consumable form.


Solution
    1. Open TextEdit.
    2. Choose Preferences from the TextEdit application menu.
    3. Click the Plain Text radio button for New Document Format.
    4. Under Saving, click the checkbox to turn off "Append '.txt' extension to plain text files."
    5. Under Rich text processing, click the checkbox to turn on "Ignore rich text commands in HTML files."
    6. Be sure the checkbox for "Wrap to Page" is deselected (Figure 1).




Figure 1 Correct TextEdit Preferences for configuration file editing

Notes

1. Any data in TextEdit prior to taking these steps may contain rich text commands that become visible after the preference changes are made.

2. TextEdit may continue to render files saved from Web browsers as HTML Source, ignoring the preferences you have set. As a workaround (after following the steps above) view the source code in the Web browser and copy/paste the text into a new TextEdit document.

Last Modified: Feb 17, 2012
  • Last Modified: Feb 17, 2012
  • Article: TA20406
  • Views:

    18846

Additional Product Support Information