I've tried
tinyMCE.execInstanceCommand("content", "mceFocus");
I've tried
tinyMCE.execCommand('mceFocus', false, "content");
None of them seem to work :-(
Well, I was stuck in the same problem. But I believe it depends where you execute the code. Here are various links that I've found so far:
http://tinymce.moxiecode.com/forum/viewtopic.php?id=8238
http://tinymce.moxiecode.com/forum/viewtopic.php?pid=91307#p91307
But I solved my issue the following, and it might not apply to yours:
this.focus();
this.tinymce.execCommand('mceFocus', false, 'yourTinyMCEtextAreaID_goes_here');
This code was applied inside the tiny_mce_src.js -> InsertHorizontalRule, just so you can have an idea of the scope.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With