ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIERichEdit blocking pasting of images
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jrpcguru

USA
266 Posts

Posted - Apr 26 2022 :  08:11:18  Show Profile  Reply
I have a program where I don't want to allow pasting of images. Just allow pasting of text or rich text.

I have tried:
// Support for insertion of images and other objects in TIERichEdit (trims about 30KB)
{.$define RichEditObjectSupport}

And I've tried editor.AllowObjects := false;

Neither blocks pasting of images either in the demo program or my program. Is there another method that I'm missing?

J.R.

xequte

38613 Posts

Posted - Apr 27 2022 :  22:18:46  Show Profile  Reply
Hi JR

I don't believe RichEdit allows you to do that unless formatting is disabled, so you would need to override the paste shortcut and implement your own pasting code (e.g. pasting plain text if there is an image on the clipboard).

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: