Editor In Arabic

6 posts, 0 answers
  1. Yagnesh
    Yagnesh avatar
    1 posts
    Member since:
    May 2008

    Posted 13 May 2008 Link to this post

    hi , any body know that in teleric Editor how can write in Arabic if know then please tell me its very argent ?
    thanks
    yagnesh(Software developer)
  2. Rumen
    Admin
    Rumen avatar
    13278 posts

    Posted 13 May 2008 Link to this post

    Hi Yagnesh,

    Here are the steps to put the editor's content area in RTL mode:

    1) Set the editor's css file to point to an external css file:

     <telerik:radeditor runat="server" ID="RadEditor1">
        <CssFiles>
            <telerik:EditorCssFile  Value="~/EditorContentArea.css"/>
        </CssFiles>
    </telerik:radeditor>

    2) In the external css file put the a global body tag with a text-align property set to right !important, e.g.

    body
    {
       
    text-align: right !important;
        padding:3px;
        background-image: none;
        margin: 0px;
        scrollbar-face-color: #E9E9E9;
        scrollbar-highlight-color: #FFFFFF;
        scrollbar-shadow-color: #E9E9E9;
        scrollbar-3dlight-color: #DBDBDB;
        scrollbar-arrow-color: #787878;
        scrollbar-track-color: #F5F5F5;
        scrollbar-darkshadow-color: #AEAEAE;
        word-wrap: break-word;
    }
     
    Save the file, delete your browser cache and restart your browser to see the change.


    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Chris Sears
    Chris Sears avatar
    15 posts
    Member since:
    Jul 2006

    Posted 31 Jul 2008 Link to this post

    I'm certainly no expert in RTL languages, but I think there's more to RTL than simply using text-align : right.

    I think you can get this to work by adding dir="rtl" to the HTML tag in the RAD Editor's IFrame. You also have to override the default stylesheet's text-align:left. This is easily accomplished by adding text-align:right to the BODY tag within the IFrame. Even better is to simply get rid of the existing alignment styling (which is what Rumen's suggestion does).

    You can simulate this process in no time using the IE developer toolbar. Turn on "Select Element By Click," then click on a RAD editor control and manually add the two HTML attributes in the appropriate places.

    Am I missing something? If this is all that's necessary, it should be easy to create a fix. Maybe someone who actually speaks Arabic can test and provide feedback :-)
  4. Rumen
    Admin
    Rumen avatar
    13278 posts

    Posted 04 Aug 2008 Link to this post

    Hi Chris,

    You can programmatically apply text-align to the body element of the editor's IFRAME with the following code:

    <script type="text/javascript">
    function OnClientLoad(editor, args)
    {  
        editor.get_document().body.style.textAlign = "right";
    };
    </script>
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad"></telerik:RadEditor>


    However, this will not make the editor's dialogs to be RTL aligned.

    The full RTL support is logged in our ToDo list for Q3 with high priority. We will make RTL skin which will provide RTL support for the content area as well as for the editor's dialogs.

    Greetings,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Ibrahim
    Ibrahim avatar
    3 posts
    Member since:
    Dec 2008

    Posted 20 Oct Link to this post

    Rumen has the right solution, but instead of
    text-align: right !important;

    write:
    direction:rtl;

     

    i tried it, its working fine.

  6. Rumen
    Admin
    Rumen avatar
    13278 posts

    Posted 23 Oct Link to this post

    I am glad that you have found a solution for your scenario.

    Just wanted to share the Right-to-Left demo of RadEditor with the community here.


    Best Regards,
    Rumen
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top