trichview.com

trichview.support




Re: SaveHTML Method


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/29/2003 23:11:47


Hi,


You need to process OnURLNeeded event (or, if you use the last version for

registered users - OnWriteHyperlink).


Code for OnURLNeeded:


procedure TForm3.RichViewEdit1URLNeeded(Sender: TCustomRichView;

  id: Integer; var url: String);

var RVData: TCustomRVFormattedData;

    ItemNo: Integer;

begin

  RichViewEdit1.GetJumpPointLocation(id, RVData, ItemNo);

  url := PChar(RVData.GetItemTag(ItemNo));

end;


For OnWriteHyperlink:


procedure TForm3.RichViewEdit1WriteHyperlink(Sender: TCustomRichView;

  id: Integer; RVData: TCustomRVData; ItemNo: Integer;

  SaveFormat: TRVSaveFormat; var Target, Extras: String);

begin

  Target := PChar(RVData.GetItemTag(ItemNo));

end;


Why TRichView does not write URLs itself?

The code above assumes that you store URLs in tags (as RichViewActions do,

for example).

But theoretically you can store in tags not only hyperlinks but also some

additional data, so using events increase flexibility.


> Hi,

>

> When I save the content of the RichView with links on it, all the links

> disapear when I save it in HTML, is there a way to keep them?

>

> Juan Jose.

>

>





Powered by ABC Amber Outlook Express Converter