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

telerik editor issues with arabic language

1 Answer 100 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 11 Mar 2013, 09:42 AM

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>

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 13 Mar 2013, 03:25 PM
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.
Tags
Editor
Asked by
Manish
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or