This is a migrated thread and some comments may be shown as answers.

How does AutoInsertHyperlinks property work?

1 Answer 61 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 02 Oct 2014, 12:55 PM
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.

1 Answer, 1 is accepted

Sort by
0
Aylin
Telerik team
answered on 07 Oct 2014, 10:25 AM
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.

 
Tags
RichTextBox
Asked by
Sergey
Top achievements
Rank 1
Answers by
Aylin
Telerik team
Share this question
or