Multiple RadEditor Tabbing Issue in the Text area

1 posts, 0 answers
  1. Mani
    Mani avatar
    4 posts
    Member since:
    Mar 2016

    Posted 29 Apr 2016 Link to this post


    On pressing the tab key in the Rad Editor control I added the following code to restrict TAB key press inside the text-area of the RadEditor as mentioned in the Forums thread. 


    editor.attachEventHandler("onkeydown", function (e) {
       if (e.keyCode == '9') {
           if ($.browser.webkit) {
               $telerik.cancelRawEvent(e); //cancel further execution of the event
               var designModeButton = $telerik.$(".reMode_design")[0];    //get reference to the design mode DOM element
               designModeButton.focus();     // tabbing out from the textarea sets the focus to the Design mode element in the RadEditor toolbar

    I have two RadEditor control in my page. When i press tab in the text-area of the first RadEditor it is coming out of the text-area and focusing the Design element in the first RadEditor toolbar. 

    But when i press Tab key in the text-area of the second RadEditor control it is coming out of the text-area and focusing the Design element of the First RadEditor toolbar in the page instead of the Current second RadEditor control Design Element. 

    This is because we are pointing to the first design element as per the below code. 

    var designModeButton = $telerik.$(".reMode_design")[0];

    So , now i need to get the current RadEditor control and set the focus to the current RadEditor control Design Mode. 

    But bu using the editor.attachEventHandler not able to  get the current  RadEditor control details. 

    Please help to get this work.





Back to Top