We are using RadControls for WPF version 2013.2.611.40
A bug was reported to us where the original selected text in a RadRichTextBox was not displayed in our custom Insert Hyperlink dialog. This is because the RadRichTextBox does not pass along the selected text to the IInsertHyperlinkDialog.ShowDialog() method if the text includes trailing newline characters.
Expected behavior (for example, Microsoft Outlook):
Open a blank new email, type a word, press enter, and select the whole line containing the word. The editor will select the word, along with the trailing newline character. When you click Insert -> Hyperlink, the trailing newline character is deselected, so that it will not be included in the created hyperlink. The "Text to display" field will then contain the word you typed.
Actual behavior (In the WPF RadRichTextBox)
Open a blank document, type a word, press enter, and select the whole line containing the word. The editor will select the word, along with the trailing newline character. When you execute the InsertHyperlinkCommand, IInsertHyperlinkDialog.ShowDialog() is called on our implementation of IInsertHyperlinkDialog as expected. However, the newline character remains selected, and as a result the passed "text" string is null. The resulting behavior is that we do not display anything in the "Text to display" field of the Insert Hyperlink dialog.
Is this a known issue?
Thanks,
Evan
A bug was reported to us where the original selected text in a RadRichTextBox was not displayed in our custom Insert Hyperlink dialog. This is because the RadRichTextBox does not pass along the selected text to the IInsertHyperlinkDialog.ShowDialog() method if the text includes trailing newline characters.
Expected behavior (for example, Microsoft Outlook):
Open a blank new email, type a word, press enter, and select the whole line containing the word. The editor will select the word, along with the trailing newline character. When you click Insert -> Hyperlink, the trailing newline character is deselected, so that it will not be included in the created hyperlink. The "Text to display" field will then contain the word you typed.
Actual behavior (In the WPF RadRichTextBox)
Open a blank document, type a word, press enter, and select the whole line containing the word. The editor will select the word, along with the trailing newline character. When you execute the InsertHyperlinkCommand, IInsertHyperlinkDialog.ShowDialog() is called on our implementation of IInsertHyperlinkDialog as expected. However, the newline character remains selected, and as a result the passed "text" string is null. The resulting behavior is that we do not display anything in the "Text to display" field of the Insert Hyperlink dialog.
Is this a known issue?
Thanks,
Evan