Alex Rivera | Logout

How do you set the focus of a TinyMCE textarea element?

Asked 2010-02-06T08:39:05.400
40

I'm using TinyMCE for a textarea on a page but it doesn't play nice in the tabbing order of the other elements.

I can use the following code to capture when I tab out of the first element:

$('#title').live('keypress', function (e) {
   if(e.keyCode == 9) {
       alert('tabbed out');
   }
});

How can I set the focus to a TinyMCE editor?

Edit
Report

1 Answer

2

This should pass focus to the TinyMCE textarea:

$("#id_of_tinyMCE_area").focus();
answered 2010-02-06T21:12:13.817

Your Answer