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

Need to change text direction of RadEditor from server side

2 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aamir Ali Ansari
Top achievements
Rank 2
Aamir Ali Ansari asked on 04 Aug 2010, 11:28 AM

Dear All
I need to change text direction of RadEditor from server side on the basis of application language. I mean "rtl" and ltr". I have tried with the following but unable to see any difference. Can you guide me in this regard.

   if (Page.IsPostBack == false)
        {
                      RadData.Attributes.Add("dir", Activity.getLanguageDirection());
}

I have also tried by adding this attribute to full page which is transformed to rtl/ltl but no effect on RADEditor..

Any suggestions??

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Aug 2010, 01:16 PM
Hi Aamir,

You can change the text alignment of the editor's content area by applying a CSS file to it after the postback. The CSS file could be set via the CssFiles property and should contain the following CSS class:

body
{
    direction: rtl;
    text-align:right;
}


For your convenience I have attached my test project.

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Aamir Ali Ansari
Top achievements
Rank 2
answered on 07 Aug 2010, 11:23 AM
Thanks... worked fine for me..I have made two different css files for both RTL and LTL reasons. On page load the current application language is detected and relevant css is added.

Regards
Aamir
Tags
General Discussions
Asked by
Aamir Ali Ansari
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Aamir Ali Ansari
Top achievements
Rank 2
Share this question
or