Format a text from Clipboard

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

Format a text from Clipboard

Post by Ceprotec »

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: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Format a text from Clipboard

Post by Sergey Tkachenko »

Sorry, I do not understand the question. Can you give an example?
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Re: Format a text from Clipboard

Post by Ceprotec »

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

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

Re: Format a text from Clipboard

Post by Sergey Tkachenko »

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: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Re: Format a text from Clipboard

Post by Ceprotec »

It worked!

Thanks Sergey
Post Reply