Hi There
I use a TRichViewEdit compnent to edit email body.
i need to add HyperLink to the email body and
make shure it will be link when sending it by email.
Rve.SaveHTML(EmailTempFile, '', 'img', [rvsoOverrideImages,rvsoOverrideImages]);
HtmlBody:=FileToStr(EmailTempFile); //***-
if cbxHebrew.Checked then
HtmlBody:=StrTran(HtmlBody,'dir=LTR','dir=RTL');
any idea how to do it?
Roni
create and send HyperLink by email
-
- Site Admin
- Posts: 17560
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Store a hyperlink target in the item Tag.
If you use RichViewActions, TrvActionInsertHyperlink does all work for you.
If not, see the demo in Demos\*\Assorted\Hypertext\CreateHyperlink
To save hyperlinks in HTML, use OnWriteHyperlink event:
If you use RichViewActions, TrvActionInsertHyperlink does all work for you.
If not, see the demo in Demos\*\Assorted\Hypertext\CreateHyperlink
To save hyperlinks in HTML, use OnWriteHyperlink event:
Code: Select all
procedure TfrmMain.rveWriteHyperlink(Sender: TCustomRichView; id: Integer;
RVData: TCustomRVData; ItemNo: Integer; SaveFormat: TRVSaveFormat;
var Target, Extras: string);
begin
Target := RVData.GetItemTag(ItemNo);
end;
-
- Site Admin
- Posts: 17560
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If you do not use RichViewActions, see the demo in Demos\*\Assorted\Hypertext\CreateHyperlink
What exactly do you want to know?
In this demo, you can see how hyperlinks are created:
- for inserting a new hyperlink, InsertStringTag is used
- for making a hyperlink from the selected text, ApplyStyleConversion and SetItemTagEd are used.
No additional code is required to store tags in RVF (in older version of TRichView, it was required to include rvoTagsArePChars in Options, but now it is not needed).
To save hyperlinks in HTML or RTF, OnWriteHyperlink is used, as I said above.
To read hyperlinks from RTF, OnReadHyperlink is used.
What exactly do you want to know?
In this demo, you can see how hyperlinks are created:
- for inserting a new hyperlink, InsertStringTag is used
- for making a hyperlink from the selected text, ApplyStyleConversion and SetItemTagEd are used.
No additional code is required to store tags in RVF (in older version of TRichView, it was required to include rvoTagsArePChars in Options, but now it is not needed).
To save hyperlinks in HTML or RTF, OnWriteHyperlink is used, as I said above.
To read hyperlinks from RTF, OnReadHyperlink is used.