Search code examples
javascriptwindowparentfckeditor

Reference FCKeditorAPI on parent window (2.0)


I have FCKeditor 2.0 loaded on a page. I then have a custom popup that I have created for some special image browsing. I need to reference the FCKeditorAPI.GetInstance('fieldname') from the popup to the parent window (window.opener).

I have tried:

window.opener.document.FCKeditorAPI.GetInstance('fieldname')

But I get an 'is undefined' message.

Any ideas how to do this? If not, How can I pass some HTML generated by a javascript on the popup to the parent window's FCKeditor instance.

Let me know if this needs clarifying.


Solution

  • just needed to remove the .document part and it works! simples!