Function TWPCustomRtfEdit.InputHyperlink(link_text:string; link_url:string) : TWPTextObj
Unit: WPCTRMemo
Class: WPCTRMemo.TWPCustomRtfEdit
Parameters
-
link_text:string link_url:string
Returns
The type of the result value is TWPTextObj.
Description
This function wrap the text which is currently selected in hyperlink tags. If tags already exist at the start and the end of the selection the URL of these tags will be updated, no new tags will be created.This code will automatically create hyperlinks:
with WPRichText1.Finder do
begin
ToStart;
EndAtSpace := TRUE;
while Next('http://*') do
begin
SelectText;
WPRichText1.InputHyperlink(FoundText);
end;
end;
Overloaded Methods
Function TWPCustomRtfEdit.InputHyperlink(URL:string) : TWPTextObj |