Hi guys,
while migrating from FCKeditor 2.6.5, I transform my customized dialogs into iframe dialogs.
These dialogs post some changes to the editor when pressing the "ok" button.
I have a serious problem figuring out how to obtain the "ok button was pressed" event in my iframe JavaScript. Has anyone faced this problem and figured out a solution?
Btw: is it possible to activate/deactivate the "ok" or "cancel" button from inside the iframe dialog?
Cheers, zahni
while migrating from FCKeditor 2.6.5, I transform my customized dialogs into iframe dialogs.
These dialogs post some changes to the editor when pressing the "ok" button.
I have a serious problem figuring out how to obtain the "ok button was pressed" event in my iframe JavaScript. Has anyone faced this problem and figured out a solution?
Btw: is it possible to activate/deactivate the "ok" or "cancel" button from inside the iframe dialog?
Cheers, zahni
Re: iframe dialog: how to get the "ok button pressed"
This displays the youtube.html file successfully in the dialog window but i need to handle the click event of the OK button to insert some html into the page. I've been looking for a solution for a while but so far have found nothing. This seems surprising considering how easy it would make upgrading fckeditor plugins if there was a solution to this.
Re: iframe dialog: how to get the "ok button pressed"
seems that I have found an ugly workaround. Paste the following JS into the script code of your iframe. It would be nice if one of the developers could have a look at this and maybe provide a more easy solution...
Re: iframe dialog: how to get the "ok button pressed"
Edit: Here's how it can be done. Simply place the following in the ok event:
My final point i'd like to make is that the support on this forum is terrible. I know they all want us to pay for the support but this is a new product and there's little to no documentation so it seems like a con to me. With FCKEditor atleast they built up a community and a knowledge base first.
Re: iframe dialog: how to get the "ok button pressed"
Re: iframe dialog: how to get the "ok button pressed"
Hi cheers but where do you pass this variable in. The iframedialog works slightly different from the standard dialog. Appreciate your help once more. Thanks
Re: iframe dialog: how to get the "ok button pressed"
Sorry for not making this clear in previous post, I'm putting a whole plugin example based on your version, I hope this could help:
Re: iframe dialog: how to get the "ok button pressed"
But this did not work. Appreciate your help again. Thanks
Re: iframe dialog: how to get the "ok button pressed"
Re: iframe dialog: how to get the "ok button pressed"
Hi
trying to use this piece of code but no luck
why is there a comma at the end of the first part and no "var" in front of "iframeWindow"?
shouldnt it be:
then i have
but this is triggering a "iframeWindow is not defined" error. (also when i modify the first code to what i thought it should be)

any help much apreciated!
thank you
Re: iframe dialog: how to get the "ok button pressed"
No. To access the variable iframewindow in the onOk function, it should be declared outside the scope of the onContentLoad function.
So something like
and then
now you can do something like
Notice I replaced 'editor' to 'this._.editor'. In my case with 'editor' it was refering to the last created ckeditor instead of the active one :s.

I'm not sure this is the right way to do it but since it took me ages to find out, I think it is worth sharing
Sander
Re: iframe dialog: how to get the "ok button pressed"