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

insertHyperlinkCallback

1 Answer 47 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Arina
Top achievements
Rank 1
Arina asked on 06 Mar 2013, 05:44 PM
problem In short description:

I have my HTML string, with href(s) inside, for example:
<a href="cfb32e1b-1f4c-4ba0-b278-0ea89a1ea4e3" target="_blank"><span class="s_7EDD076B" dir="RTL">ארינה</span></a>

i do this flow:
var provider = new HtmlFormatProvider();
textCtrl.Document = provider.Import(text);

After i do it my HTML is changed by Telerik controls by removing dir="RTL" from my href(s).
So in UI these href(s) are displayed LTR, for example:
<a href="cfb32e1b-1f4c-4ba0-b278-0ea89a1ea4e3" target="_blank"><span class="s_7EDD076B">ארינה</span></a>

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 11 Mar 2013, 09:52 AM
Hello Arina,

RadRichTextBox uses internal logic in order to determine the direction of the language that particular parts of the text is in. What you can set is the direction of a paragraph - using the UI this can be done using the text direction button in the Home tab (see attached screenshot). In code, you can use the method:

this.radRichTextBox.ChangeParagraphFlowDirection(System.Windows.FlowDirection.RightToLeft);

As for inserting hyperlinks through code, you can refer to this article for explanations and sample code snippets: Hyperlinks.

I hope this helps.

Greetings,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Arina
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or