I have a CMS system that displays two CKEditors side by side so that the user can edit the main body and sidebar content. Both editors share the same toolbar.
I have added a plugin to allow users to add embedded data into the editor. The only problem is I need the data to show on the currently selected editor, where the keyboard cursor is currently setting.
How do I use javascript or JQuery to get the CKEditor element that is currently selected before the button in pressed on the toolbar.
Right now I can only get it to work by directly selecting a specific editor instance.
CKEDITOR.instances.mtxDescription.insertHtml(data);
However I need to be able to have the data drop directly into whichever editor is selected