When I tried to paste an url like "http://code.google.com/" into the RichTextEditBox, it doesn't convert to a hyperlink automatically.
Is it possible to convert it automatically without monitoring pasting events? If I had to monitor pasting event, can I have some examples?
Thanks.
1 Answer, 1 is accepted
0
Petya
Telerik team
answered on 28 Dec 2012, 01:39 PM
Hi Yuxiao,
With the Q2 2012 version of RadControls for Silverlight we released auto-hyperlinks feature in RadRichTextBox. Basically when you add an interval or a new line in the document, it matches the last word to a couple of regular expressions in order to determine if it is a valid hyperlink or email. In that case, it adds the respective for hyperlink functionality and UI representation.
This is similar to the way Microsoft Word works if you type or paste plain text which is a valid hyperlink. For example, if you paste the following text in both MS Word and RadRichTextBox:
none of the lines will be converted to hyperlinks at first. If you then add an interval right after one of the occurrences of "http://code.google.com/", only this occurrence will be converted to a hyperlink.