Stripping some (but not all) formatting from rtf text (on a mac).
May 2, 2007 1:55 AM
Subscribe
Is it possible to programmatically strip some (but not all) of the formatting from text that's been copied from safari?
So you know how when you copy and paste from Safari to Textedit (or another rtf-aware program), all the formatting comes through -- the links, the italics, images, etc?
I want to programmatically strip out all the formatting except the bolds and italics -- most importantly, to strip out the hyperlinks and images. I'm going to be copying a lot of text, so basically I just want this to be the push of a button.
Writing a script for textedit itself is out: the rtf is opaque (the only option is just to convert it to plain text, and I'll lose the italics). Nisus Writer Pro (beta) yields a similar roadblock (though if I could call up a contextual menu for each word using GUI scripting the problem's solved -- I don't think this is possible). I'd rather not use word because it's crashy under rosetta. Suggestions?
posted by Tlogmer to computers & internet (13 comments total)
1 user marked this as a favorite
Er. That wasn't very clear. I'd rather not use Microsoft Word.
posted by Tlogmer at 1:56 AM on May 2, 2007