Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Some perhaps unknown TextEdit features Apps
This hint has to do with TextEdit.app This is actually somewhat documented, but seriously, how often do you click the "What's new in TextEdit" link? I know I never did before. One new feature I like is being able to modify .webarchive files that Safari can save. If you save a web page, specifically one with ads, you can open the .webarchive file with textedit and cut out the ads and re-save. Sometimes it doesn't work perfectly, but it's better than nothing.

There are tons of new features in this version. Be sure to check them out. The ones I like are:
  • "TextEdit can now save WordML, HTML, and Safari WebArchive documents. In the preferences panel you can specify a number of options for controlling the type of HTML that is generated."
  • "The Cocoa text system now lets you create multiple, non-contiguous selections when editing text. Option-drag will let you select text in a rectangular area [this is cool, but I don't know how useful it is]; command-click will let you add new selections to an existing selection. You can then copy the contents of these multiple selected regions as if they were one. In addition, you can select all occurrences of a word in the Find panel by holding down control when clicking 'Replace All' [this exposes the 'Select All' command]. Finally, you can use the Styles panel to find all text which is of a given style."
I found this out exploring the free example code with the Dev Tools (and yes, the full source for the application TextEdit is free and included in /Develooper -> Examples -> AppKit, but that isn't the point of this hint). According to the ReadMe in the above path, this is new with version 1.4, which shipped with Tiger.

[robg adds: We've covered the non-contiguous selection feature here before, but the ability to edit .webarchive files is news to me, as is the control-click in the Find box. I was aware that Option changed Replace All to Selection in Find, but didn't know you could use Control to select all occurrences that match your search term.]
    •    
  • Currently 1.80 / 5
  You rated: 2 / 5 (5 votes cast)
 
[14,263 views]  

10.4: Some perhaps unknown TextEdit features | 5 comments | Create New Account
Click here to return to the '10.4: Some perhaps unknown TextEdit features' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Some perhaps unknown TextEdit features
Authored by: lihtox on Oct 24, '06 10:07:22AM

I didn't know about the "option-drag" selection method; that will be very useful in working with columns of text, as well as for removing leading characters like ">".

And I just realized that the same thing works in TeXShop too! Very cool!



[ Reply to This | # ]
10.4: Some perhaps unknown TextEdit features
Authored by: boredzo on Oct 24, '06 05:01:39PM

These are features of the Application Kit's additions to the NSAttributedString class. As such, every application that uses a standard rich text view (these use an attributed string internally) inherits these features. Not necessarily the ability to open webarchives — a developer must be explicit about support for that — but definitely the rectangular selection.

The rectangular selection in AppKit is not that useful, though, because it only lets you delete the selection. You can't copy-and-paste or drag-and-drop the selection elsewhere while keeping the rectangularity; it will be pasted as a series of lines. Neither can you use rectangular selection to actually edit the same substring of multiple lines at once. Both of these are supported in vim (ctrl-v); the latter is supported in SubEthaEdit (which it calls "blockedit" with a slightly different UI).

*crosses fingers for 10.5*



[ Reply to This | # ]
10.4: Some perhaps unknown TextEdit features
Authored by: zpjet on Oct 25, '06 01:26:23AM

i can copy paste and drag drop and yes it pastes as lines but what else if it's a text?



[ Reply to This | # ]
10.4: Some perhaps unknown TextEdit features
Authored by: sbump on Feb 27, '07 09:08:24AM

option-drag is also very useful in Preview for selecting text from one column of a multicolumn pdf.



[ Reply to This | # ]
10.4: Some perhaps unknown TextEdit features
Authored by: mikelly321 on Jan 24, '09 11:49:55AM

is there a way for a textedit web archive to save quicktime videos or to control the size that swfs come through as instead of the one size fits all?

I discovered that if you drag the html attached to a swf into a textedit doc, that it will open the swf the correct size if you rename your .rtfd to .html on the desktop (creates a folder you have to drag your swf, active content js into), but apparently, no new html doc is generated only the original embedded one is available.

thanks,

Mike




[ Reply to This | # ]