HTML with/without active hyperlinks?

General TRichView support forum. Please post your questions here
Post Reply
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

HTML with/without active hyperlinks?

Post by vega »

On the click of a button, I need to save two HTML files to disk from the same rvf document and in one go. The first file must have active HTML links and not the second file.

I know how to do that separately with SaveHTMLEx using or not using the OnWriteHyperLink event. However I don't know how to avoid triggering the OnWriteHyperLink when the second file (no active links) is written to disk. I don't really find my way through all the params and options of OnWriteHyperLink.

Thanks in advance for any help.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You may assign RichViewEdit1.OnWriteHyperlink := nil before saving the-no hyperlink file, and reassign it to the proper procedure when saving file with links.
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

Post by vega »

Sergey Tkachenko wrote:You may assign RichViewEdit1.OnWriteHyperlink := nil before saving the-no hyperlink file, and reassign it to the proper procedure when saving file with links.
Thanks, the de-assigning works. I reassign it like this :

RichViewEdit1.OnWriteHyperlink := RichViewEdit1.OnWriteHyperLink;

Is this the proper way to do it?
dave novo
Posts: 105
Joined: Wed Aug 31, 2005 2:13 am

Post by dave novo »

Hi Vega,

That last bit of code does not make much sense.

something like

Code: Select all

oldEvent:=RichViewEdit1.OnWriteHyperlink;
RichViewEdit1.OnWriteHyperlink:=nil;
save stuff....
RichViewEdit1.OnWriteHyperlink :=oldEvent
would seem to be more useful
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

Post by vega »

dave novo wrote:Hi Vega,

That last bit of code does not make much sense.

something like

Code: Select all

oldEvent:=RichViewEdit1.OnWriteHyperlink;
RichViewEdit1.OnWriteHyperlink:=nil;
save stuff....
RichViewEdit1.OnWriteHyperlink :=oldEvent
would seem to be more useful
Thanks dave novo. That did it.
Post Reply