hi
I need to get value from the editor on pop up window in the editor on parent page
does anyone have any idea on how to do it
var oEditor1 = FCKeditorAPI.GetInstance ('FCKeditor2');
var x = oEditor1.GetXHTML(true);
var oEditor = window.parent.InnerDialogLoaded() ;
oEditor.InsertHtml( x ) ;
this is how i am trying to do it but i am getting a javascript error that object does not support property or method on the popup page.
I would be grateful if someone could help me out here
thanks
I need to get value from the editor on pop up window in the editor on parent page
does anyone have any idea on how to do it
var oEditor1 = FCKeditorAPI.GetInstance ('FCKeditor2');
var x = oEditor1.GetXHTML(true);
var oEditor = window.parent.InnerDialogLoaded() ;
oEditor.InsertHtml( x ) ;
this is how i am trying to do it but i am getting a javascript error that object does not support property or method on the popup page.
I would be grateful if someone could help me out here
thanks

RE: get value from popup to parent
RE: get value from popup to parent
I'll reply here, rather than over mail:
InnerDialogLoaded doesn't get you the FCK Object, you need to do InnerDialogLoaded().API.InsertHtml( x ) ;
But suburia, you tell me over mail that that isn't working either...
I've mailed you back, but maybe it's better to continue here, so others can read it as well.
Your code:
echo '
<script type="text/javascript">
<!--
var oEditor = window.parent.InnerDialogLoaded();
var FCK = oEditor.FCK;
var sven = FCK.GetXHTML( true );
document.write(sven);
-->
</script>
';
Is the GetXHTML method only not working or can't you reach the FCK Object at all?
Do you have your code in a standard dialog? I can see that you're in a PHP page. Are you sure to have the javascript function 'InnerDialogLoaded' available on your page? The function is in the html page 'fckdialog.html' that normally is the parent frame of the page where you have your code. (so your code should be in an iFrame of the fckdialog.html)
RE: get value from popup to parent
How do I test if I can reach the FCK Object?
Sorry, but what does standard dialog mean? My english aint good enough i guess! =\
Hmm,
This is how i get the editor:
include("FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '[url]/FCKeditor/';
$oFCKeditor->Value = $body;
$oFCKeditor->Create() ;
This is the output code:
<input type="hidden" id="FCKeditor1" name="FCKeditor1" value="Skriv din text här" style="display:none" />
<input type="hidden" id="FCKeditor1___Config" value="" style="display:none" />
<iframe id="FCKeditor1___Frame" src="[my url]/FCKeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default" width="891" height="378" frameborder="0" scrolling="no"></iframe>
Hope you can help me:)
MVH // Jon W
RE: get value from popup to parent
http://wiki.fckeditor.net/Developer%27s ... script_API
RE: get value from popup to parent
I want to open a popup from the editors windows and get the content from the editor to the popup window.
It's for a preview thing i got:)
Is that possible?
Thanks, J!
RE: get value from popup to parent
RE: get value from popup to parent
This is what I first tried...
echo '<script type="text/javascript">
<!--
var oEditor = FCKeditorAPI.GetInstance( \'FCKeditor1\' ) ;
var content = oEditor.GetXHTML( true ) ;
alert(content);
-->
</script>
';
Gives me no alert...=\
Thanks, J!
RE: get value from popup to parent
RE: get value from popup to parent
RE: get value from popup to parent
RE: get value from popup to parent
RE: get value from popup to parent
But anyway, you want to reach the FCKeditor out of a popup outside of the editor.
So do what you normally do to get a property of the parent window: "opener."
Giving: var oEditor = opener.FCKeditorAPI.GetInstance('InstanceName') ;
That is, when you open your popup with window.open();
IF you show a hidden iframe or something than you'll have to do "parent."
RE: get value from popup to parent
http://www.sugarplumfairy.nu
http://www.husno4.com
http://www.bandborsen.se
RE: get value from popup to parent
I figured it worked the other direction. But boy i'm wrong.
This works just fine:) You save med alot of problems:)
Thanks alot "saul11"
Greetings:)
RE: get value from popup to parent
Window.opener...????