How does AutoInsertHyperlinks property work?

2 posts, 0 answers
  1. Sergey
    Sergey avatar
    58 posts
    Member since:
    Jan 2013

    Posted 02 Oct 2014 Link to this post

    Hello!

    I found neither explanation in documentation nor sample about AutoInsertHyperlinks property.

    How does it work?

    For example:

    Document = new RadDocument();
     
    const string input = @"
    sdfsdf
    sdf
    sdf
    s";
    var editor = new RadDocumentEditor(Box.Document);
    editor.Insert(input);

    RadRichTextBox show this as plain text.

    What behaviour of AutoInsertHyperlinks property is standard?

    And how I can use advantages of this property right?

    Thank you.
  2. Aylin
    Admin
    Aylin avatar
    75 posts

    Posted 07 Oct 2014 Link to this post

    Hi Sergey,

    The AutoInsertHyperlink property is applicable only when typing hyperlinks in RadRichTextBox in real time.
    In order to insert a hyperlink in a RadRichTextBox programmatically you need to specify this. The following sample code inserts a hyperlink in the document programmatically:
    HyperlinkInfo info = new HyperlinkInfo()
    {
        NavigateUri = "www.google.com",
        Target = HyperlinkTargets.Blank,
        IsAnchor = false
    };
    this.richTextBox.InsertHyperlink(info, "Link to Google");

    You could find more information on that topic in our online documentation.

    Regards,
    Aylin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top