I'm creating a stripped down version of the Image plugin. My version doesn't have any tabs, just an browse/upload, a drop-down containing previously uploaded images and a 'place' button, to place the selected image into the Document.
// Register the related commands.
FCKCommands.RegisterCommand( 'Place_Image' , new FCKDialogCommand( FCKLang['costaPlaceImageTitle'] , FCKLang['costaPlaceImageTitle'] , FCKConfig.CostaPath + 'index.php?module=cms&action=InsertImage' , 500, 400 ) ) ;
// Create the "Find" toolbar button.
var oPlaceImage = new FCKToolbarButton( 'Place_Image', FCKLang['costaPlaceImageTitle'] ) ;
oPlaceImage.IconPath = FCKConfig.PluginsPath + 'placeimage/costaPlaceImage.gif' ;
FCKToolbarItems.RegisterItem( 'Place_Image', oPlaceImage ) ; // 'My_Find' is the name used in the Toolbar config.
The problem I'm having is that I can't figure out how to get the selected image from my custom Image pop-up's $_POST vars into the EditorDocument in the window.opener window.
I've put this in:
var oEditor = window.parent.InnerDialogLoaded() ;
...which does return a valid FCK object because I can <code>alert(oEditor.FCKConfig.SkinPath);</code> on it and I get valid output.
However, if I try to do this:
<code>Image = oEditor.EditorDocument.createElement('IMG');
'oEditor.EditorDocument' is null or not an object.
What am I doing wrong?
Noel da Costa
Custom Image plugin - how do I place in Doc?