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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIERichEdit blocking pasting of images

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jrpcguru Posted - Apr 26 2022 : 08:11:18
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.
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 27 2022 : 22:18:46
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