Hi Sergey
How do I delete Hyperlinks?
Thanks
Michael
Removing Hyperlinks
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If you use RichViewActions:
Create a new TrvActionInsertHyperlink action.
In the localization procedure of your form, assign its caption and hint to something like 'Convert To Plain Text', 'Remove Hyperlinks'.
Implement 2 events of this action: OnHyperlinkForm and OnUpdate.
In the ActionTest demo, they will be:
Create a new TrvActionInsertHyperlink action.
In the localization procedure of your form, assign its caption and hint to something like 'Convert To Plain Text', 'Remove Hyperlinks'.
Implement 2 events of this action: OnHyperlinkForm and OnUpdate.
In the ActionTest demo, they will be:
Code: Select all
procedure TrvActionsResource.rvActionInsertHyperlink2HyperlinkForm(
Sender: TObject; InsertNew: Boolean; var Text, Target: String;
var Proceed: Boolean);
begin
if not InsertNew then begin
Text := '';
Target := '';
Proceed := True;
end
else
Proceed := False;
end;
procedure TrvActionsResource.rvActionInsertHyperlink2Update(
Sender: TObject);
begin
(Sender as TrvActionInsertHyperlink).Enabled := Form3.RichViewEdit1.SelectionExists;
end;