How to Copy and Apply (Paste?) Text Style?

How to Copy and Apply (Paste?) Text Style?

MS Word has a feature called the Format Painter that allows you to:

  1. Select text
  2. Copy the format (style, like font,size, bold, etc)
  3. Select new text
  4. Apply the format from Step #2.

Is this possible in KM with or without AppleScript?

Not that I know of.

It might be possible to use a similar hack involving writing the styled text to an RTF, then textually replacing the contents with the contents of your next text, and then reading the RTF, along the lines described in Any way to “Add Link” to text within KM?.

But that’s about all I can think of.

Hey Michael,

Are you trying to do this specifically in Word or just anywhere?

-Chris

My immediate need is in Evernote Mac.

Don’t really need it in Word since Word already has the Format Painter.

I have a KM macro that will sort a list in Evernote, but it removes all styles.

Hey Michael,

Context is crucially important to macro-making.

Sorting styled-text is possible - various RTF editors such as Tex-Edit Plus & Jedit X can do it.

However there’s no easy way to do it with Keyboard Maestro or AppleScript.

Furthermore - Evernote’s handling of the clipboard still weird. Copying from it to Tex-Edit Plus or Jedit X does not produce the same font and size!

You can play with this by copying text from Evernote and then running this from the Terminal:

osascript -e 'the clipboard as «class RTF »' | perl -ne 'print chr foreach unpack("C*",pack("H*",substr($_,11,-3)))'

-Chris

If you run this action after copying from Evernote, can you paste in to Tex-Edit/JEdit?