views:

516

answers:

1

We have a RTE editor based on htmlarea which consists of content with editmode enabled inside an iframe. The question is how to automatically bring the focus into the editor.

+1  A: 

Where the id of the IFRAME is myRTE:

var iframe = document.getElementById("myRTE");
if ( iframe && iframe.contentWindow )
   iframe.contentWindow.focus();
Shog9