user2598808 user2598808 - 24 days ago 4
jQuery Question

TinyMCE - Multiple Rich Text Editors - How to get the focus of mous cursor to track which editor is selected

I have multiple TINYMCE Rich Text Editors in one page.

How can I track the focus to see which one is selected.

Cursor doesn't work on RTE always.

Refer the code here : http://fiddle.tinymce.com/5heaab

Please suggest.

Answer

I got the solution for this, posting the answer so that it will be useful for others.

We can get focus using the below code:

 var triggerElement = tinyMCE.activeEditor.id;

 var myEditor = tinyMCE.editors[triggerElement];
Comments