Text Not Pasted with Colour

Coloured text is not retained via the Insert styled text by pasting action:


Perhaps this is an Ms Office issue only.

Hey Hans,

Don't play with the system clipboard token.

Just paste the clipboard. If it's styled text then styled text will be pasted.

The Insert Text Styled by Pasting action copies the styled text in the action to the clipboard and then pastes it.

The %SystemClipboard% token produces plain-text...

Tokens [Keyboard Maestro Wiki]

“ All tokens return a text value, even if the source data was some other data type.”

-Chris

1 Like

Hello Chris,

Thanks for replying.

To be honest, I’ve never understood the concept of a token, or, to be more precise: the difference between a variable and a token.

I’ll look into it.

Cheers,

Hans

A variable is a storage element that can have any content, provided it is of the proper data type. All variables in Keyboard Maestro are of type text, and that means plain-text.

A token is essentially a command that returns a value, but it is able to do so in a text context - i.e. a text-field.

3 Likes

(and whereas Keyboard Maestro variables are always plain text, and Keyboard Maestro tokens always generate plain text, clipboards can contain data of various types)

If it ain't plain text that you want, use the clipboard directly.

2 Likes