telerik editor issues with arabic language

2 posts, 0 answers
  1. Manish
    Manish avatar
    1 posts
    Member since:
    Mar 2013

    Posted 11 Mar 2013 Link to this post

    Requirements

    RadControls version
    .NET version
    Visual Studio version
    programming language
    browser support

    all browsers supported by RadControls


    PROJECT DESCRIPTION
    i have telerik editor issues with arabic language , when i typing in arbaic from right to left and then i press space key control shifted to
    right of text , how i can solve this issue .

    here is my code :
     <telerik:radeditor saveinfile="true" OnClientSubmit="OnClientSubmit"
                                           direction="rtl" style="width: 590px; direction: rtl;
                                    text-align: right" enableembeddedskins="true" id="RadEditor1" onclientload="EditerTabindex" OnClientCommandExecuting="OnClientCommandExecuting"
                                    runat="server" editmodes="Design, Preview,html" newlinebr="false"  stripformattingonpaste="Span,MSWordRemoveAll">
                                   <ClientEvents OnKeyPress="AlphabetOnly" />
                                             <CssFiles>
                                             <telerik:EditorCssFile Value="../Template/Resources/css/Editor.css" />
                                             </CssFiles>
                                                                          <Tools>
                                <telerik:EditorToolGroup Tag="NewGroup">
                                 
                                        <telerik:EditorTool Name="Cut"   />
                                    <telerik:EditorTool Name="Copy" />
                                    <telerik:EditorTool Name="Paste" />
                                      <telerik:EditorTool Name="Underline" />
                                    <telerik:EditorTool Name="Bold" />
                                           <telerik:EditorTool Name="Italic" />
                                    <telerik:EditorTool Name="FontName"  />
                                    <%--<telerik:EditorTool Name="FontSize"/>--%>
                                     <telerik:EditorTool Name="RealFontSize" Text="Size" />
                                    <telerik:EditorTool  Name="ForeColor"  />
                                    
                          <telerik:EditorTool Name="BackColor" />
                                    
                                      <telerik:EditorTool Name="RTL" />
                                     <telerik:EditorTool Name="InsertUnorderedList" />
                                     <telerik:EditorTool Name="InsertOrderedList" />
                                    
                                     
                                     <telerik:EditorTool Name="Redo" />
                                      <telerik:EditorTool Name="Undo" />
                                     
    </telerik:EditorToolGroup>
    </Tools>
                                        
                                         <Content>
    </Content>
                                     
                                        
                                     </telerik:radeditor>


    javascript :

      <script type="text/javascript">
               function OnClientSubmit(editor) {
                   editor.set_html(Telerik.Web.UI.Editor.Utils.convertWordLists(editor.get_html()));
                   editor.fire("FormatStripper", { value: "WORD_ALL" });

                   //            alert(editor.get_html(true));
               }
               function EditerTabindex(editor) {

                   editor.get_document().body.style.textAlign = "right";
                   editor.removeShortCut("InsertTab");
                   var iframe = editor.get_contentAreaElement();
                   iframe.setAttribute("tabIndex", "2");
                   iframe.setAttribute("Direction", "rtl");
                   var buttonsHolder = $get(editor.get_id() + "Top");
                   var buttons = buttonsHolder.getElementsByTagName("A");
                   for (var i = 0; i < buttons.length; i++) {
                       var a = buttons[i];
                       a.tabIndex = -1;
                       a.tabStop = false;
                       //alert("fdgdfg");
                   }

               }
        </script>
     <script type="text/javascript">
         function OnClientCommandExecuting(editor, args) {
             var name = args.get_name();
             var val = args.get_value();
             if (name == "Paste") {
                 editor.fire("PastePlainText");
                 args.set_cancel(true);
             }
         }

         function AlphabetOnly(sender, eventArgs) {
             var c = eventArgs.get_keyCode();
             if ((c < 65) || (c > 90 && c < 97) || (c > 122))
                 eventArgs.set_cancel(true);
         }
      </script>
  2. Rumen
    Admin
    Rumen avatar
    14070 posts

    Posted 13 Mar 2013 Link to this post

    Hello,

    I investigated the issue and found that it is a browser behavior which can be reproduced in a standard editable iframe element as shown in the following video: http://screencast.com/t/0ixddLcraY.

    I noticed that if you edit a full HTML page with XHTML DOCTYPE in RadEditor the behavior becomes better but sometimes this problem pops up again.

    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top