Poor little TextEdit! Despite having a rich history—starting life as Edit in the Next’s NextStep operating system before becoming a feature in Mac OS X—the app gets little regard. But it deserves our attention. It’s the best and simplest place to go in OS X for converting among text formats and has features that are still missing in Pages 5 after they disappeared in the bump up from Pages 4 (’09).
TextEdit seems like a homely little app. When launched, it doesn’t present a list of templates and folderol. Rather, its dialog box lets you open a document or create a new one. Click Create Document, and you’re presented with a stripped-down screen. It looks true to its origins, like something from the 1990s.
I’ve turned to TextEdit dozens of times recently, and I’ve referred readers, friends, and family to it when Pages 5 doesn’t cut it for their needs. Here are a few key examples of where TextEdit helps.
Formatted text is its native language
At its heart, TextEdit is a rich-text engine and that’s because its native encoding is Rich Text Format (RTF). RTF is widely supported and decades old developed originally by Microsoft. It’s an interchange format that can preserve formatting, like a bold text style and type size, while also incorporating images, font references, and comments.
While Microsoft’s word-processing formats, .doc (pre-2007) and .docx (Word 2007 and later), are somewhat universal at this point, there’s often a mismatch between formats with which you’re presented to open or save as and those you need, especially if you’re using Pages, OpenOffice, or Word as the hub through which data passes.
TextEdit can open Word files (the older .doc and newer-but-now-quite-old .docx formats), Open Document .odt files (from OpenOffice and other programs), RTF, and plain text files. It also handles HTML, which can be displayed either as rich text with embedded formatting and links or, by changing an item in TextEdit preferences, as raw HTML. (RTF files can also be edited in their raw format, but this is much less typical and useful that you’ll need access to their underlying code.)
It supports Safari’s Web Archive format (File > Save As and select Web Archive from the Format menu), which preserves all the content on a webpage, though when TextEdit opens it, it’s not necessarily perfect at rendering the page as it appears in the original. However, by including formatted and linked text along with images, the format makes it possible to take a page in a browser and in TextEdit extract its text or turn it into a word-processing file.
I frequently use TextEdit as a converter, too, because not only can it open all of those formats, it can save files out as a wide variety. (Hold down the Option key while selecting the File menu to see and selected Save As, which replaces the default Duplicate menu item.)
Rich Text Document (RTF, saved as .rtf)
Rich Text Document with Attachments (.rtfd) creates a bundle with an RTF file and all the referenced images. This is often a great way to take a document with embedded images and instead of copying and pasting each image separately, created essentially an exported directory with every image contained. (To see the images, you right-click the .rtfd file, and select Show Package Contents.)
Web page (.html)
Web Archive Document (.webarchive), discussed above
And a range of word-processing formats: OpenDocument Text (.odt) and three Word formats: .doc, .xml, and .docx. TextEdit identifies these as Word 97, Word 2003, and Word 2007 formats, respectively. The .doc format remains the baseline for a lot of older software.
Search and you shall re-find
Many choices Apple made in creating Pages 5 have left users and this writer baffled, but none more so than the removal of advanced search and replace options. Search and replace is one of the best parts of word processing after actual typing and spellchecking, as it allows you to find problems or matches throughout and optionally fix them. If you misspelled a word consistently (or even inconsistently), you can find all its iterations and replace them with the right version. Or you can check if you’ve overused a term.
The Pages 5 find features have little sophistication, but you can turn to TextEdit when you need more advanced options. Save your Pages 5 file as a .docx file (File > Export As > Word with default settings) to best preserve all its formatting, then open it in TextEdit. (Yes, it’s more than a little peculiar that Apple’s text utility can handle Microsoft and Open Document formats, but not its own Pages’ files, whether Pages ’09/version 4 or Pages 5.)
In TextEdit, press Command-F (Edit > Find > Find), and a search field opens at the top of the window for quick searches. As you type, a count appears at the right of the field for the number of matches. Check the Replace box and now you can swap in results, too (or select Edit > Find > Find and Replace, or press Command-Option-F). An oddly divided Replace and All conjoined button corresponds to “replace just the next match” and “replace all matches in the file.”
Click the magnifying glass icon, and a drop-down menu offers basic options (like ignore case and full word) found in Pages, but also lets you select whether a pattern is at the start of a word—like “key” finding both “keystroke” and “keyboard”.
Click Insert Pattern, and you get to the good stuff, where you can find invisible characters like tabs, paragraph breaks (returns), line breaks (Shift-return), and page breaks, as well as wildcards. TextEdit can also parse and recognize email addresses, URLs, and phone numbers.
The nifty part that’s hidden at first is that you can also use patterns in replace, although ones defined in the Insert Patterns pop-up. So let’s say you want to find all email addresses in a document that are followed by a comma and a space, then replace them with the address followed by a paragraph return.
- In the Find field, select the pop-up, select Insert Pattern, and choose Email Address, and then type a comma and then a space.
- With the cursor in the Replace field, click the pop-up icon and select Insert Pattern, and you’ll see only options relevant to replace, which will include Email Address because it’s used in the Find field. Select that, then repeat to insert Paragraph Break.
When you click All, all matches are replaced in the document, preserving the email address in each case. This is a limited form of pattern-matching replacement, something found in more advanced and varied versions in Word, BBEdit, and OpenOffice.
Converting from Markdown’s HTML output into an editable word-processing file
I often write in Markdown, an explicit text-formatting language that combines human readability with parsing (in content-management systems, blogs, native software, and elsewhere) to let you tag lightly and then run through a parser that spits out nicely made HTML. However, the path from Markdown to rich text or .doc while retaining text formatting, incorporating images, and keeping hyperlinks active is often rocky.
TextEdit eased that path for me, and you’ve got two ways to make use of it.
I could open a Markdown-exported HTML page from within a browser window with images and all and paste into Pages 4, which appropriately accepts rich-text pasting between apps, then export that document to RTF (holding down Option, select File > Save As). (Pages 5 doesn’t offer RTF export.) That RTF file can be opened in TextEdit and exported as a Word .doc or .docx.
You can also work from the HTML end, if you’re not trying to incorporate images, and load an HTML file in TextEdit, which renders it into rich text while preserving formatting and links. It doesn’t open referenced files. This can then be exported as .doc or .docx, which can be opened in Pages 4 or 5.
In either case, you wind up with an editable word-processing document with everything or nearly everything intact.
Pages 5 final form
While TextEdit is a stop gap for a lot of routine purposes, Pages continues to evolve. Apple stuffed more than one would expect in minor releases in Pages 5.5 and 5.6 (see our review of 5.6), restoring long-lost functionality. We can only hope that Pages 5.7 or, could we even dream, Pages 6 would bring the power of TextEdit back into Apple’s flagship word processor.
This story, "Reasons to love TextEdit, a secret powerhouse of rich text" was originally published by Macworld.