Hyperlinks do not export to HTML
Posted: Tue Nov 16, 2010 12:50 pm
When I insert a hyperlink in my document, it works if I ctrl-click it. After exporting to HTML, the link is transformed into a blue underline text, not a link.
Also the compiler says that the ReadHyperLink method referenced by OnReadHyperLink has an incompatible params list and asks if I want to delete the reference. Here is what I have:
Declaration:
procedure RichViewEdit1ReadHyperlink(
Sender: TCustomRichView; const Target, Extras: String; DocFormat: TRVLoadFormat; var StyleNo, ItemTag: Integer; var ItemName: String);
Procedure:
procedure T_FrmRicardoCSS.RichViewEdit1ReadHyperlink(
Sender: TCustomRichView; const Target, Extras: String; DocFormat: TRVLoadFormat; var StyleNo, ItemTag: Integer; var ItemName: String);
var URL: String;
begin
if DocFormat=rvlfURL then StyleNo := rvActionInsertHyperlink1.GetHyperlinkStyleNo(RichViewEdit1);
URL := rvActionInsertHyperlink1.EncodeTarget(Target);
ItemTag := Integer(StrNew(PChar(URL)));
end;
And here is the export procedure:
procedure T_FrmRicardoCSS.RichViewEdit1WriteHyperlink(
Sender: TCustomRichView; id: Integer; RVData: TCustomRVData;
ItemNo: Integer; SaveFormat: TRVSaveFormat; var Target, Extras: String);
begin
if isExporting = True then begin
Target := PChar(RVData.GetItemTag(ItemNo));
if _frmSettings.cbxLinksTarget.Checked then Extras := 'target=_blank';
end;
end;
Could you please tell me what I am doing wrong?
Thanks.
Also the compiler says that the ReadHyperLink method referenced by OnReadHyperLink has an incompatible params list and asks if I want to delete the reference. Here is what I have:
Declaration:
procedure RichViewEdit1ReadHyperlink(
Sender: TCustomRichView; const Target, Extras: String; DocFormat: TRVLoadFormat; var StyleNo, ItemTag: Integer; var ItemName: String);
Procedure:
procedure T_FrmRicardoCSS.RichViewEdit1ReadHyperlink(
Sender: TCustomRichView; const Target, Extras: String; DocFormat: TRVLoadFormat; var StyleNo, ItemTag: Integer; var ItemName: String);
var URL: String;
begin
if DocFormat=rvlfURL then StyleNo := rvActionInsertHyperlink1.GetHyperlinkStyleNo(RichViewEdit1);
URL := rvActionInsertHyperlink1.EncodeTarget(Target);
ItemTag := Integer(StrNew(PChar(URL)));
end;
And here is the export procedure:
procedure T_FrmRicardoCSS.RichViewEdit1WriteHyperlink(
Sender: TCustomRichView; id: Integer; RVData: TCustomRVData;
ItemNo: Integer; SaveFormat: TRVSaveFormat; var Target, Extras: String);
begin
if isExporting = True then begin
Target := PChar(RVData.GetItemTag(ItemNo));
if _frmSettings.cbxLinksTarget.Checked then Extras := 'target=_blank';
end;
end;
Could you please tell me what I am doing wrong?
Thanks.