Need to strip out images when pasting HTML

General TRichView support forum. Please post your questions here
Post Reply
dakota
Posts: 35
Joined: Tue Jan 13, 2009 11:25 pm

Need to strip out images when pasting HTML

Post by dakota »

I need to strip out all images when pasting HTML into TRichViewEdit (set up as RTF editor). I'm trying to use the technique explained here http://www.trichview.com/forums/viewtopic.php?t=5174

.... however, when i paste from HTML, the OnPaste event never fires so this code never runs.

Anyone have any ideas on how to achieve this?

Thanks,

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

Post by Sergey Tkachenko »

How do you paste HTML?
dakota
Posts: 35
Joined: Tue Jan 13, 2009 11:25 pm

Post by dakota »

Hi Sergey:

A user would highlight the desired portion of a web-page that they want, then copy and paste it into TRichView. If it contained any images, I can't allow them to be pasted.

I am using the THTMLView and RVHTMLViewImporter. I think I found a solution though.

In rvHtmlViewImport, I just put an "Exit;" at the top of the .ImportPicture procedure to bypass images entirely. I know this is not a very elegant solution but I don't need pictures "at all" (at least not right now).

I'm still using v12, is this supported in the newest version?

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

Post by Sergey Tkachenko »

No, there is no option for skipping images in HTML.
Post Reply