Hello TRichView Support,
after running the RemoveHyperlinks action, both the hyperlink and its text are removed. I can reproduce this behavior in your RichViewActionTest demo.
Steps to reproduce:
Start the RichViewActionTest program. The sample text is displayed as expected.
Select the hyperlink in the text and execute the RemoveHyperlinks action.
→ The hyperlink is removed, and the text appears with the default formatting. This works as intended.
Now insert the link www.google.com and press Enter. It is correctly displayed as a hyperlink.
Select this newly created hyperlink and run the RemoveHyperlinks action again.
→ This time, the entire text is deleted.
Is there a way to remove only the hyperlink without deleting the text?
RemoveHyperlinks Action deletes entire text instead of only removing hyperlink
-
Sergey Tkachenko
- Site Admin
- Posts: 17995
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RemoveHyperlinks Action deletes entire text instead of only removing hyperlink
I confirm the problem. A fixed version will be released soon.
Quick fix:
Open RichViewActions.pas.
Find the code:
change to:
Quick fix:
Open RichViewActions.pas.
Find the code:
Code: Select all
if AllowChangingText and (StartNo = EndNo) and
(rve.GetItemStyle(i) >= 0) and
(rve.GetItemTag(i) = rve.GetItemTextW(i)) then
begin
rve.SetItemTextEd(i, String(NewTag));Code: Select all
if AllowChangingText and (NewTag <> '') and (StartNo = EndNo) and
(rve.GetItemStyle(i) >= 0) and
(rve.GetItemTag(i) = rve.GetItemTextW(i)) then
begin
rve.SetItemTextEdW(i, NewTag);-
Sergey Tkachenko
- Site Admin
- Posts: 17995
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RemoveHyperlinks Action deletes entire text instead of only removing hyperlink
Fixed in TRichView 24.0.3
Re: RemoveHyperlinks Action deletes entire text instead of only removing hyperlink
Hi Sergey,
thank you for your help. I implemented the quickfix and everything is working fine.
thank you for your help. I implemented the quickfix and everything is working fine.