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

Quickly strip formatting from Safari's clipboard Web Browsers
When in Safari, Mac OS X is smart enough to copy the formatting of text when you copy it from a webpage. Unfortunately, this is not always convenient. For example, say I wanted to copy a link to send to my friend via IM. When I try to paste the link, instead of pasting the URL, it pastes the anchor tag. Also, let's say you are trying to type a paper with some word processor and you want to quote some webpage, but you need the text to match the font and styling of your paper. Microsoft Word offers an ambiguously named Paste Special that removes the formatting from text, but not all programs have that (although it would make a very nice addition to the Services menu.)

Fortunately I have found a quick solution to this problem, which I have been using for over a year. After copying your text in Safari, simply change focus to the Google search bar (Command-Option-F) or URL bar (Command-L), then execute Paste, Select All, and finally Cut. This can be done very quickly from the keyboard by holding Command and typing V-A-X, so this doesn't take a significant amount of time once you get used to it. Then end result is text with no formatting.

This still seems to work reliably even with huge amounts of text: I tried to paste pi to the millionth digit into the Google search bar as a test. Text selection within the bar became dreadfully slow, but when I cut it and then pasted it into TextEdit, all of the text came through properly, with all of the formatting stripped.

[robg adds: You might also look for a 'Paste and Match Style' option in the destination program. If it exists, this usually has the keyboard shortcut of Shift-Command-Option-V. But for apps that insist on pasting with style, this is a pretty quick workaround.]
    •    
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[15,630 views]  

Quickly strip formatting from Safari's clipboard | 19 comments | Create New Account
Click here to return to the 'Quickly strip formatting from Safari's clipboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Quickly strip formatting from Safari's clipboard
Authored by: SimonDorfman.com on Dec 16, '05 07:09:51AM
Here's an applescript that'll do the trick:

do shell script "pbpaste | pbcopy"
--converts clipboard to plain text

tell application "System Events" to keystroke "v" using {command down}
--pastes clipboard using command-v keyboard shortcut


[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: windrag on Dec 16, '05 08:37:54AM

There is an addition to the Services menu, as you say. DevonTechnologies' Word.Service. It will remove formatting, change case, sort lines, all kinds of handy stuff.

---
windrag | 700MHz iBook 16 VRAM G3 | 640MB RAM | OS X 10.4.3

[ Reply to This | # ]

Command/ Option/ V to insert plain text:
Authored by: tice on Dec 17, '05 11:19:56AM
Just use Spark for additional shortcuts and put that script under the shortcut.

do shell script "pbpaste | pbcopy"
--converts clipboard to plain text

tell application "System Events" to keystroke "v" using {command down}
--pastes clipboard using command-v keyboard shortcut

Spark is freeware: Go to Spark Homepage

[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: johnsawyercjs on Feb 07, '09 05:03:13AM

That Applescript does properly strip formatting from the clipboard contents, but it doesn't successfully paste what it's stripped. Possibly the author wrote it without testing it, since it SEEMS like sending a simple Command-V from this Applescript should accomplish a paste. Instead, the Applescript launches, strips the clipboard formatting, then quits without pasting, but you can then enter Command-V to paste the stripped clipboard into the app of your choice. You might as well remove the line

tell application "System Events" to keystroke "v" using {command down}

I decided to use Plain Clip instead, since it's faceless--no launching app to get in the way. I tried to get Spark to launch Plain Clip, but Spark didn't work for me, in a variety of ways--not launching, hanging, etc., and when it didn't hang, it didn't respond to my keyboard command to launch Plain Clip (I tried Option-Command-V, trying to paste into TextEdit and Microsoft Word 2004, version 11.5.0). So, I tried Keyboard Maestro--that worked. However, my first attempt at creating a Keyboard Maestro macro to launch Plain Clip, I also appended a command to the macro to send a Command-V to paste the stripped clipboard, but like the Applescript suggested by SimonDorfman above, it wouldn't paste after stripping. So, I just removed the Command-V part of the macro, and settled on entering its trigger (Option-Command-V) to strip the clipboard, and then I enter the regular Command-V to paste the clipboard at the insertion point in the desired target app.



[ Reply to This | # ]
Plain Clip
Authored by: taran on Dec 16, '05 07:41:49AM
I use Plain Clip, a small freeware faceless app that does the equivalent of Simon's AppleScript. I use Quicksilver, so I type - Ctrl-Space, pl, Enter - and its done.

[ Reply to This | # ]
Plain Clip
Authored by: teszeract on Dec 18, '05 03:28:31PM

I also use this combo - but even easier is to assign ctrl-v as a trigger in QS. So ctrl-V > cmd-V to paste.



[ Reply to This | # ]
A simple solution...
Authored by: dmmorse on Dec 16, '05 08:37:46AM
Here's a link to a little program I ran across some time ago for pasting plain text:

PlainTextPaste

It installs a menu option in the edit menu for all cocoa apps. It is a beta, but it's never given me any problems. Cheers!

[ Reply to This | # ]

A simple solution...
Authored by: rgl7194 on Dec 16, '05 10:10:46AM

I use PlainTextPaste as well, and have never had any issues with it. I'm currently running 10.3.9.



[ Reply to This | # ]
PlaintextPaste
Authored by: Deut3221 on Dec 16, '05 12:49:01PM

PlaintextPaste: now there's a 10 start Pick of the Week!



[ Reply to This | # ]
PlaintextPaste doesn't work under 10.5?
Authored by: johnsawyercjs on Feb 07, '09 05:11:04AM

PlaintextPaste doesn't appear to work under OS 10.5/Leopard--its SparkPlug prefpane doesn't appear in System Preferences after you install PlaintextPaste, nor do its additional paste commands appear in Cocoa application Edit menus.

I wondered if the SparkPlug prefpane might be related to the Spark hotkey utility, but it's not--Spark is an app, and SparkPlug is a mysterious System Preferences prefpane which the PlaintextPaste docs, installer, etc. only mention as if it's supposed to be there automatically. It doesn't appear in software download sites like MacUpdate, etc. as a separate utility.

Looks like Plain Clip is the utility to use now. I wanted to try its companion, Plain Clip Plug, in Spark, since Plain Clip Plug is supposed to be able to strip the clipboard and paste the result all with one command/macro key, but as I mention in a comment above, I couldn't get Spark to work, so I don't know if Plain Clip Plug really does paste text. I assume it would for some people who can get Spark to work, at least with some apps and under some versions of OS X.



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: CajunLuke on Dec 16, '05 09:09:12AM

If you just want to copy the link, just drag it into the IM window.



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: elpelso on Dec 16, '05 10:16:25AM

I have had success with selecting the text in Safari, and option-dragging it into wherever I need it. In FileMaker this results in the text taking the format that field is supposed to have, rather than the Safari formatting.



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: Interactive on Dec 16, '05 07:55:30PM
lpelso,

I did not know this trick you mentioned, and really appreciate it. Right now, I am doing a lot of copy-paste from Safari into FileMaker. I cannot tell you how much I appreciate your short & invaluable Option+Drag hint!



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: grueni on Dec 17, '05 09:23:13AM

well as far as Filemaker goes a simple command-option V (paste with option down) does the trick for me convince any pasted text to behave as definde in the field I paste into
Jo



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: osxpounder on Dec 16, '05 11:05:25AM

A great tip, because it'll save me some wear & tear on the hands. Until you pointed this out, I'd been keeping a TextEdit plain text document page open just so I could paste, copy, then paste again into Mail. Thanks!

---
--
osxpounder



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: mark hunte on Dec 17, '05 02:40:47AM

But why not paste into mail and the change the mail to plain text from the format menu ??

---
mh



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: RobertBen on Dec 18, '05 12:44:33AM

Because that's not the same, just give both methods a try with web content...



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: mark hunte on Dec 18, '05 02:15:12AM

I was replying to osxpounder mail copy and paste.

In this case it seems it would be easier to make the mail plain text.

I do note however, this does not get rid of images caught in the selection.

Also as rob points out there are past options in some apps. Mail is one of them.




---
mh



[ Reply to This | # ]
Quickly strip formatting from Safari's clipboard
Authored by: tommyw on Dec 18, '05 03:07:10AM

This tip works fine in the OmniWeb Google search bar also.



[ Reply to This | # ]