I pasted into TRichViewEdit text "Images and hyperlinks" that contained a hyperlink "http://www.richedit.com/forums/viewtopic.php?t=3654". It was copied from Micrisoft Word. Then I started to input some letters, but format wasn't changed! I thought the hyperlink shall close when pasting ended?
Or after saving in database when I write down letters after the hyperlink, the same trouble - text is formatted as hyperlink, and tag is included...
Is it right policy?
Why Tag didn't close?
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
There are procedures for URL detection and hyperlink termination on typing. You need to call then when the user pressed Enter, Tab, space and comma characters.
If you use RichViewActions, use TrvActionInsertHyperlink's DetectURL and TerminateHyperlink methods. Example can be found in the ActionTest demo.
If you do not use RichViewActions, use the unit URLScan.pas from the demo Assorted/Hypertext/URLs.
This unit contains the functions DetectURL and TerminateHyperlink. Example can be found in this demo.
If you use RichViewActions, use TrvActionInsertHyperlink's DetectURL and TerminateHyperlink methods. Example can be found in the ActionTest demo.
If you do not use RichViewActions, use the unit URLScan.pas from the demo Assorted/Hypertext/URLs.
This unit contains the functions DetectURL and TerminateHyperlink. Example can be found in this demo.