Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

RichEditor : Paste from Word

 Post Reply Post Reply
Author
dehorter olivier View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 Aug 2010
Posts: 121
Post Options Post Options   Quote dehorter olivier Quote  Post ReplyReply Direct Link To This Post Topic: RichEditor : Paste from Word
    Posted: 15 May 2019 at 12:17pm
Hi

I have to copy/paste formatted text from winword to an richeditor componant; and it works great.

However I have an option to copy/paste this formated text as a plaintext. I tried to use events
"OnPasteFormattedText" and "OnPasteText" to do that.  but these event are not triggered, specially  OnPasteFormattedText.

So how can I do this conversion troughout clipboard ?

regards
olivier
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7925
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2019 at 12:24pm
I assume you refer to copy in Word and paste in TAdvRichEditor?
If you want to accept it as plain text only in TAdvRichEditor, you can  set
AdvRichEditor.ClipboardFormats := [cfText];

Default, it will first check if Word did put RTF on the clipboard and use this and if not, fall back to plain text.
Back to Top
dehorter olivier View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 Aug 2010
Posts: 121
Post Options Post Options   Quote dehorter olivier Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2019 at 3:11pm
Hi

It works, great

thanks

PS maybe to add into the FAQ ?
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7925
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2019 at 10:51pm
We added it to the FAQ
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down