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

RadRichTextBox hyperlink dialog issue

3 Answers 233 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sebastien
Top achievements
Rank 1
Sebastien asked on 11 May 2016, 01:44 PM

Hi,

We're using version 2015.2.728.45 of Telerik UI for WPF and we are encountering an issue with the hyperlink dialog. Here is the related xaml code used in the ribbon of the application:

<telerik:RadRibbonButton LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/inserthyperlink.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertHyperlinkDialogCommand}" telerik:ScreenTip.Description="Create a link to a Web page, a picture or an e-mail address." telerik:ScreenTip.Title="Insert Hyperlink" Size="Large" Text="Hyperlink" />

Each time we insert/update an hyperlink using the "Insert Hyperlink" modal dialog, we get an extra "http://" prefix added to the beginning of the address. What should we do to avoid this behaviour?

Thanks for your help,

Sébastien

3 Answers, 1 is accepted

Sort by
0
Sebastien
Top achievements
Rank 1
answered on 12 May 2016, 03:38 PM
Another question: is there a way to use other protocols than http (for example UNC)?
0
Sebastien
Top achievements
Rank 1
answered on 13 May 2016, 03:44 PM

OK I think I understand the issue:

"http://blabla.com" is supported by the hyperlink dialog

"http://blabla.com/bla bla" is not supported because of the space and will add an "http://" prefix each time you edit it...

Can you fix this?

0
Tanya
Telerik team
answered on 16 May 2016, 10:42 AM
Hi Sebastien,

This is a known behavior of the RadInsertHyperlinkDialog and it is related to its implementation. When the URL doesn't match the regular expression, an "://" is added to the string.

You could create a custom dialog and implement its behavior according to your preferences. The Custom InsertHyperlingDialog demo shows a sample on how this could be achieved.

Hope this helps.

Regards,
Tanya
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
RichTextBox
Asked by
Sebastien
Top achievements
Rank 1
Answers by
Sebastien
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or