The example application that comes with RichView (Demos\Delphi\Assorted\Hypertext\URLs) is very basic and I'm having a hard time implementing this feature into my application. I need something that will detect a URL if it is typed in, but if the URL is edited it should refresh the tag with the updated URL. Also if you remove the "http://" or "www." from the URL, it should recognize it's not a valid URL anymore and remove the URL style. If anybody happens to have some sample code that does this, I would really appreciate it. Honestly, I thought that RichView already had this functionality built in when I bought it since other editors have it, but I didn't read well enough Thanks for any help!
Gavin
Can anyone share an example program that detects URLs?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sorry, this is the only demo for URL detection. All complicated logic is in URLScan.pas, copy it to your project.
This file in demos has bug in processing of Unicode text, the fixed version is here: http://www.trichview.com/support/files/urlscan.zip
Yes, this demo does not implement removing link after user removed "http://" or "www.". But I just looked in MS Word 2003 and OE 6 - they do not do it as well.
As for updating tag - yes, this is not implemented yet. I requires additional functions of TRichViewEdit that will be implemented in one of future updates (you can update tag in OnItemAction event, but there will be problems with undo)
This file in demos has bug in processing of Unicode text, the fixed version is here: http://www.trichview.com/support/files/urlscan.zip
Yes, this demo does not implement removing link after user removed "http://" or "www.". But I just looked in MS Word 2003 and OE 6 - they do not do it as well.
As for updating tag - yes, this is not implemented yet. I requires additional functions of TRichViewEdit that will be implemented in one of future updates (you can update tag in OnItemAction event, but there will be problems with undo)