Is it possible to create a macro which would paste paste unformatted content of clipboard.
I regularly have to paste bulleted outlines, and would like to paste without the formatting (bullets, indents, etc)
thanks very much for your time and help!
Simply add a Filter Clipboard action with “Remove Styles” to your macro.
But whether this will remove things like indents and bullets will depend on the source. (Where you copied from.) If it doesn’t remove what you want it to remove, then you’ll likely have to additionally apply some Search & Replace to the clipboard content.
thank you very much Tom.
Could my macro simply be the above, followed by Cmd-V to paste?
Yes, of course.
Or, add a Paste action (after the Filter) and assign a hotkey trigger like for example ⌃⌥⌘V. This way you can filter and paste with a single hotkey press.
thank you very much !
sorry: by the paste action, you mean typing Cmd-V, or a macro paste action?
The Paste action:
thanks very much Tom !
I’ve long had that assigned to CMD+Shift+V.
Hi, could you explain where from and how you did this. thanks very much for taking the time to comment.
Of course. Here you go.
now I understand. thanks very much and have a nice weekend !
Instead of the “Type ⌘V Keystroke” action I would use the pre-built “Paste” action (see above).
Probably, at the moment, the two actions do the same thing, but since we are working inside a given system I would avoid to hardcode things, if not necessary.
The “Paste” action is (at least) one layer above the “Type Keystroke” action. We don’t know about the details, and it is not of concern. But when the system (the developer) decides that there will be a better method to paste items than by typing keystrokes (e.g. when a new OS poses problems), the “Paste” action will be updated.
If you have hardcoded the “Type ⌘V” into your macro (instead of using “Paste”) your macro will never see that update.
Thank you Tom for your comment.
- it’s funny that paste as unformatted text does not get rid of bullets. I understand it’s possible to do a search/replace for outline related characters, but it’s a bit tedious.
- what action(s) would you use so that the macro pastes and emulates (in the format of) the destination document?
That’s because it depends on the type of text if, for example, the bullet is part of the list “style” or just a simple character.
For example if you have a list in a RTF document, and you copy a list item to the clipboard, then the bullet is represented as
in the RTF flavor of the clipboard.
However in the Plain-Text flavor of the clipboard the bullet is represented just as a plain bullet character, i.e. it is not a style or formatting thing any longer.
So, if you copy a list item from one RTF document to another, it will adapt to the list style of the target list: if the target list has dashes as list item markers, then your pasted item will get a dash.
If you paste into a document that does not understand RTF, then most likely the Plain-Text flavor of the clipboard will get pasted, that is, the bullet will simply be pasted as a bullet character, even if the surrounding list items all have dashes.
If you apply a “Remove Styles” KM action to the clipboard, the action is just deleting all clipboard flavors except the Plain-Text one, that’s all.
That depends on the format of the text and the editor. As shown above, if you copy from one RTF list into another, the list item marker should automatically get the style of the destination list. (At least in TextEdit; it may be handled differently by different RTF editors.) If you paste an entire list, then it will paste along the bullets from the source.
But what you are trying to do is essentially removing certain characters (bullet and indenting tab) from the clipboard. I fear, the only way to do this, is manually with a search/replace action.
thanks very much, Tom. A brilliant answer, as usual