Need to change text direction of RadEditor from server side

3 posts, 0 answers
  1. Aamir Ali Ansari
    Aamir Ali Ansari avatar
    22 posts
    Member since:
    Jun 2010

    Posted 04 Aug 2010 Link to this post

    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. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 04 Aug 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aamir Ali Ansari
    Aamir Ali Ansari avatar
    22 posts
    Member since:
    Jun 2010

    Posted 07 Aug 2010 Link to this post

    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
Back to Top