Hi
Have many editors on a page. I want to InsertHtml() in the editor the user is currently writing in.
How can I get the correct editorinstance?
I used this in fckeditor:
Then I have the name of the editor in a hidden field (<input type="hidden" id="focusedEditor"....) and can insert the html in the correct editor.
How to do this with CKEditor?
Have many editors on a page. I want to InsertHtml() in the editor the user is currently writing in.
How can I get the correct editorinstance?
I used this in fckeditor:
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.Events.AttachEvent( 'OnFocus', setFocusedEditor ) ;
}
function setFocusedEditor(editorInstance) {
document.getElementById("focusedEditor").value = editorInstance.Name;
}Then I have the name of the editor in a hidden field (<input type="hidden" id="focusedEditor"....) and can insert the html in the correct editor.
How to do this with CKEditor?
