TextEdit seems like a simple text editing tool, but it actually has some pretty rich features. You can do things like set document properties, edit code, define and use styles, insert images, audio and video, and even export HTML documents.
You can also watch this video at YouTube.
Watch more videos about related subjects: TextEdit (28 videos).
You can also watch this video at YouTube.
Watch more videos about related subjects: TextEdit (28 videos).
Video Transcript
Hi, this is Gary with MacMost.com. Today let's take a look at things you may not know you could do using TextEdit.
MacMost is supported by more than 600 viewers just like you. Go to MacMost.com/patreon. There you could read more about the Patreon Campaign. Join us and get exclusive content and course discounts.
So TextEdit, of course, is an app that comes with your Mac and is a lot more powerful than people think. You probably already know TextEdit has two modes. A Plain text editing mode and Rich text editing mode. You can switch between the two of them by going to Format and you'll either see Rich Text if you're in the plain text mode or Plain Text if you're in the Rich Text mode. We'll start off by looking at things you could do in Plain Text mode.
So here I have some sample texts. There are two modes for wrapping the text. Here I've got it wrapping according to the width of the window. If I move the window here you can see the text rewraps according to the size of the window. This is very different than how you will see things in a word processor like Pages where there is just a specific page size. But you can switch to Wrap to Page in Plain Text format by going to Format, Wrap to Page. Then you have a page size here and wrapping will stay the same no matter what the size of the window. Most of the time in Plain Text mode you probably want it to wrap to the window.
Now, of course, in Plain Text you can't change text styles. You can't make things bold, or italics or change the size. But you can change the font that is used to display everything here. If you go to TextEdit, Preferences and then under New Document you can look for Font and there's Plain Text Font. You can click that to change to something else and that will change the size for everything. Note that you have to close the document out and then reopen it to see the change.
There was also there, by the way, the default font for a Rich Text document. You could set the default window size. So here it's set to 90 characters. But say if I wanted it to be 50 characters I could do that. That's only for new documents or when I go back to open this plain text document and you can see it opens much narrower now.
Now while there's not too much you can do in terms of formatting for plain text documents you can insert Page Breaks. So if you wanted to divide up a set of notes and have a forced page break you can put the cursor where you want it to be, then go to Edit and then Insert and Page Break. Here you'll just see it as a line. But if you go to Format, Wrap to Page you can see how those two paragraphs are on one page and the page break will actually take it to the next page here.
Often we use TextEdit to edit documents that are actually code like html code, css. If you're doing that a common thing you need to do is jump to a certain line. Like if you get an error message and it'll say the error is on line 53. You can do that in TextEdit by going to Edit, Find, and here you'll see all the normal Find things. Find, Find and Replace. But you'll also see Select a Line which is Command L. So we'll use the keyboard shortcut, Command L, and enter a line number and you can see how it jumps right to a line.
An interesting hidden feature that works in Plain Text and Rich Text mode is to kind of lock the document by going to Format, Prevent Editing. This locks it and now you can't actually edit the document. That is until you go to Format, Allow Editing. So it's not really a security measure. It's maybe just something for you to use when you want to make sure you don't accidentally change the text.
Now let's go and change this to Rich Text mode here and now we have a lot more options. One kind of hidden one is under File you've got Show Properties. There's a set of properties for each Rich Text document. You could set Author Authorization, etc. Now these are useful for your own organization but it's also good to note that these will show up in Spotlight searches. So if you had comments or keywords here and you do a Spotlight search you'll find this document even if that keyword is nowhere to be found in the actual text of the document.
Now you can also insert media if you're using Rich Text documents. So let's create a space here and I'm going to drag a photo from the Finder into TextEdit. When I do that it's going to ask me to change the format. So you could see here it explains that there are actually two RTF formats. RTF and RTFD. When I converted to Rich Text it did RTF as the standard format. But it needs to go up a level from that and go to RTFD which allows attachments. So I'm going to say, sure fine, convert this document to RTFD and that will allow this attachment here. You can see this image here.
Now a few things about inserting images. One is you can't resize them in TextEdit. You also can't really place them. They are placed inline in the text and I can do things like center that line and it will center that image. But a really cool thing that you can do with it though is mark it up. Notice I have a little markup tool there just like you would see if you're using Mail or another app that supports markup tools. I can click on that and actually other third party extensions may show up in here as well. But I can go to Markup and then I have all the markup tools that we see in Preview. I can draw on it. I can add shapes. I could add text like captions. I can also rotate it here or crop it if I want to. Then hit Done and the cropped version will now appear in here. So while you should really resize the image before you bring it into TextEdit you can do some things with it once you have it in here.
Now you can also insert other things. You can insert audio and video. Now I'm going to drag and drop a MP3 file in here and place it there. Now strangely it really doesn't look like much at first. That's because it's actually a pretty large little player image there and I have a small line. So what I'm going to do is I'm going to adjust the line height here. I can click here and only go up to double the size. I'll actually click here and go to More. I'll make it exactly say something like a 120 pts and now you can see most of the player there with a little playback button and everything.
Let's try it with a video. So I'll take a sample video here. Drop that in and it's actually going to give me a warning because this is so big that it wants to make sure I really want to insert this into this file. I can choose to have an Alias to it. So in other words the file is external to this TextEdit file. Now I have a little playback window and everything like that. So if you really want audio or video in your TextEdit files you can do it.
Another thing you can do is insert Links. So you can select some text here and then go to Edit, then Add Link. Then you could type a URL here and it will convert the text that you had selected to a link. If you had no text selected it would actually insert the link text as the link.
So there are other things you could insert as well. You can go to Format and insert a simple list. But you could also do a more complex Table. Then you get this whole little interface here where you can set the number of rows and the number of columns. Horizontal and vertical alignments. Cell borders for whatever cell is selected. Even cell backgrounds. Even nest tables inside each other. So you can do a lot of creative things by using tables.
You also have Styles which are kind of like the styles in Pages but they work very differently. So, for instance, we select some specific text and you could see this button here gives you access to Style. So let's go and make this something like a bigger font, make it bold, and let's say I want to make that a regular style I want to use throughout the document. So I can click here, go to Show Styles. Now you can view the styles in this document or go to your Favorite Styles which is what you want. You'll see a list here of the same things that you saw when I clicked that button. So I could decide to add this style there. Go back to Document Styles and it shows me what I have selected. Then Add to Favorites. Now I can give this a name. Let's call this Special 1 and I can choose what to include. I want to include the Font as part of the style. Hit Add. Now I'll select some other text. I'll click here and I'll see Special 1 is listed. I'll select that and you could see it changes that text to that style. If I click here and go to Show Styles I can go back to favorite styles. Look through the list. There's Special 1 and it shows exactly what it will change here. It will change the font to Helvetica, makes it Bold, 24 pt. I can hit Select to select all of the text within the entire document that uses that style. So you can see here I selected both those pieces of text. That's kine of neat. There's a lot of powerful functionality there if you want to explore how TextEdit uses styles.
Now what I've got here is a Rich Text document. But I can actually save this out as HTML. So this is handy if you're maintaining a website and you want to create a simple page that has some formatting. You can't use attachments. It can only use text. But it will maintain things like the style of the text, links that you may have and other elements. To save it out as a HTML document I can go to File and then hold the Option key down so I do Save As. So I'll be saving a copy of this as something else. At the bottom I can choose the file format. One option there is a Web Page. So I can save this out to the desktop as a web page. You can see it here as a html document. If I double click on that it will open it up in Safari and you could see here the text styles are kept the same. Even that link is kept the same.
Now you have some preferences for that. In TextEdit Preferences, under Open and Save, html saving options here allow you to set the document type, the styling, whether the css is embedded inline or not included at all. Which encoding to use and whether or not white spaces are preserved using special characters. Now if you take a html document like this and you drag and drop it onto TextEdit it will open it up using the formatting inside of html. So you can actually go back into the html document like this. But there's a setting for this. If you go into TextEdit Preferences, under Open and Save, you can check off this Despite html files as html code instead of formatted text. This allows you to edit html documents using the code in them. Now if I drag and drop onto TextEdit you'll see I can see the html code. This is not just useful for something you created in TextEdit, but if you wanted to edit the code of html documents using TextEdit you want to check that preference box so now you can actually see all the code and you're working plain text.
Another thing you can do in TextEdit is open up Microsoft Word documents with it. You can do the same thing in Pages. TextEdit is a little simpler. It's just going to give you the text and some very basic styling. But if you take a word document file like this one, drag it onto TextEdit, it will open it up so you can read what's inside. Very handy when somebody sends you an email that's got a Microsoft Word attachment to it and you don't have Word.
But if you want you could also create Microsoft Word documents with this because you may have noticed when I went to create an html document by using Save As, that another option here was Save Either As a dot x or a dot format word document. So you can see there's a lot of power inside of TextEdit. A lot of tasks that people use Pages or Microsoft Word for they could just use TextEdit for. It's a really lightweight app that creates a really small file. Using it instead of a big word processor is a good productivity hack.
Thank you for increasing my understanding of TextEdit and especially your point about saving a TextEdit document as a Word document (which is valuable to me since I move stuff between an up-to-date laptop and a much older desktop that has an old Word app and cannot read a Pages file). BUT, when I click on the File menu top save the document there is no "Save As" button, only "Save." What do I do?
Michael: You need to hold down the Option key to see Save As.
I use TextEdit often to save the text from a website. I select (highlight) the text, HESITATE and then drag and drop the text to TextEdit.
When TextEdit refers to a line it is actually referencing a paragraph. In the shareware program Tex-Edit Plus using AppleScript you can actually refer to lines even inside of paragraphs. I only mention this as TE+ is going away as it is 32 bit and will not be upgraded. I'm looking for a replacement. TE+ is extremely AppleScript friendly. I'm trying to use TextEdit and have some work arounds but scripting it is more difficult.
John: A "paragraph" is just a string of text with a return at the end. This is what a line is when it comes to software errors and such. That's what you want. You don't want the line numbering to take into account wrapping as that won't be useful in software debugging situations.
Being old and slow, I missed your point on how to change the font size of all the lines in an existing TextEdit document. Your help is greatly appreciated.
Don: Do you mean for plain text files, or rich text? If plain text, just go to TextEdit, Preferences and change it there. Then close and reopen the document if you need to.
Gary, it's done. Thank you very much.
I want to replace words with a different font color so they'll show up and the replace feature doesn't allow it, or does it?
Terry: There's no way to search by font color of text that I can think of.
Which is the maximum number of words TextEditi can do at once when transforming from RTF to Txt? We are working with large corpora
c: I'm not away of any maximum, and I've opened some pretty large server log files with TextEdit. I don't know why there would be a maximum for converting. But just try it with one of your files and see. If you have a truly humongous RTF file you can always open it in any word processor (Pages, Word, etc) and try to export from there as txt, or copy and paste, or ... there are lots of things to try.