Page 1 of 1
Need to strip out images when pasting HTML
Posted: Mon Jul 29, 2013 9:52 pm
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
Posted: Tue Jul 30, 2013 2:40 pm
by Sergey Tkachenko
How do you paste HTML?
Posted: Tue Jul 30, 2013 3:03 pm
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
Posted: Tue Jul 30, 2013 3:24 pm
by Sergey Tkachenko
No, there is no option for skipping images in HTML.