Question regards handling autodetecting hyperlinks

General TRichView support forum. Please post your questions here
Post Reply
tomr
Posts: 47
Joined: Wed Dec 09, 2020 9:36 am

Question regards handling autodetecting hyperlinks

Post by tomr »

Hello RichView Support,
I have a question regarding the automatic detection of hyperlinks. The behavior can be reproduced using the RichViewActionTest demo.

Steps to reproduce:
  • Start the demo and clear the RichView editor.
  • Type a string that will be detected as a hyperlink (for example: [email protected]). After pressing Space, the text is correctly detected as a hyperlink.
    Hyperlink start.png
    Hyperlink start.png (18.57 KiB) Viewed 1261 times
  • Select the hyperlink and execute the action “Remove Hyperlinks”. The hyperlink is removed as expected.
    Remove Hyperlinks.png
    Remove Hyperlinks.png (26.52 KiB) Viewed 1261 times
    Remove Hyperlinks After.png
    Remove Hyperlinks After.png (12.04 KiB) Viewed 1261 times
  • Place the cursor directly after the last character of the former link and press Space or Enter.
    At this point, the hyperlink is detected again automatically.
    After Space.png
    After Space.png (18.63 KiB) Viewed 1261 times
Is there a way to prevent the hyperlink from being detected again in this situation without disabling the automatic hyperlink detection feature entirely?

Thank you in advance for your help.

Best regards
Sergey Tkachenko
Site Admin
Posts: 18078
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Question regards handling autodetecting hyperlinks

Post by Sergey Tkachenko »

This feature is not implemented.
You can implement it yourself: hyperlink detection is implemented by calling rvActionInsertHyperlink1.DetectURL in OnKeyPress and OnKeyDown events of the editor.
But I think that re-detection is a normal behavior.
tomr
Posts: 47
Joined: Wed Dec 09, 2020 9:36 am

Re: Question regards handling autodetecting hyperlinks

Post by tomr »

Hi Sergey,
Thanks for the information.
Post Reply