How to auto convert an url into a hyperlink when it is pasted?

2 posts, 0 answers
  1. Yuxiao
    Yuxiao avatar
    19 posts
    Member since:
    Jul 2012

    Posted 28 Dec 2012 Link to this post


    When I tried to paste an url like "" 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? 


  2. Petya
    Petya avatar
    973 posts

    Posted 28 Dec 2012 Link to this post

    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  "", only this occurrence will be converted to a hyperlink.

    You can verify that behavior in our online demo.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top