Format a text from Clipboard

General TRichView support forum. Please post your questions here
Post Reply
Ceprotec
Posts: 226
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Format a text from Clipboard

Post by Ceprotec » Thu May 30, 2019 12:01 pm

Hello Sergey

I would like to format a text from clipboard from another document according to the formatting of the field being pasted, how do we proceed?
We are pasting into a TRichViewEdit component.

thanks

Sergey Tkachenko
Site Admin
Posts: 14465
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Format a text from Clipboard

Post by Sergey Tkachenko » Thu May 30, 2019 12:54 pm

Sorry, I do not understand the question. Can you give an example?

Ceprotec
Posts: 226
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Re: Format a text from Clipboard

Post by Ceprotec » Thu May 30, 2019 5:09 pm

I want to clear the formatting when pasting a copied text.
Sorry for my English.

Image

Sergey Tkachenko
Site Admin
Posts: 14465
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Format a text from Clipboard

Post by Sergey Tkachenko » Thu May 30, 2019 6:13 pm

Call PasteTextW instead of PasteDef.
If you use RichViewActions, you can use TrvActionPasteAsText. Its default shortcut is Shift+Ctrl+V (Edit | Paste as Text command).

Ceprotec
Posts: 226
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Re: Format a text from Clipboard

Post by Ceprotec » Thu May 30, 2019 8:17 pm

It worked!

Thanks Sergey

Post Reply