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

Multiple RadEditor Tabbing Issue in the Text area

0 Answers 52 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mani
Top achievements
Rank 1
Mani asked on 29 Apr 2016, 09:35 AM

Hi,

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.removeShortCut("InsertTab");  

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.

 

 

 

 

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Mani
Top achievements
Rank 1
Share this question
or