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

Bug with pasting hyperlinks containing anchors

2 Answers 108 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 26 May 2016, 02:55 PM

Hi,

I noticed that if you paste a hyperlink containing an anchor such as this into a RichTextBox, everything except the anchor's name will be removed from the href attribute, resulting in links that do not work.

Do you have any advice or tips on a way to work around this?

Thanks

2 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 26 May 2016, 02:56 PM

Amendment:

This only seems to be a problem when pasting from MS Office products such as Word or Outlook. Pasting from a web browser seems to work as expected

0
Tanya
Telerik team
answered on 31 May 2016, 08:18 AM
Hi Steve,

Thank you for the provided information.

I managed to reproduce the issue and added it to our backlog. You could subscribe to receive updates about status changes on it through the related public item. I added some Telerik points to your account as a token of appreciation for bringing this to our attention.

Depending on the source, the pasted content is imported with different format providers and the issue is related to the RtfFormatProvider, which is used by default when pasting content from MS Word and MS Outlook. When pasting from a browser, the clipboard passes the content as HTML thus, the HtmlFormatProvider is used.

As a workaround, you could try changing the ClipboardHandlers of RadRichTextBox as described in this help article

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
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or