Hello i have the problem that i want to use more than one FCKEditor in a page. For that i have the following loop of PHP Code that creates approx. 7 Editors:
foreach ($arrLanguages as $objLanguage)
{
?>
<div id="lng_text_<?php echo $objLanguage->getDatabaseId();?>" style="display: none; background-color: #F3F3F3; border: 1px solid silver;">
<table>
<tr>
<td>Benennung:</td>
<td><input name="lngname[<?php echo $objLanguage->getDatabaseId();?>]" type="text" value="<?php echo $objNode->getName($objLanguage->getDatabaseId());?>" size="60"></td>
</tr>
<tr>
<td valign="top">Artikelbeschreibung:</td>
<td>
<?php
$oFCKeditor = new FCKeditor('FCKeditor['.$objLanguage->getDatabaseId().']') ;
$oFCKeditor->BasePath = $pathToRoot."/libs/thirdparty/fckeditor/" ;
$oFCKeditor->ToolbarSet = "Basic" ;
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="<a href="http://www.fckeditor.net/" target="_blank">http://www.fckeditor.net/</a>">FCKeditor</a>.' ;
$oFCKeditor->Create() ;
?>
</td>
</tr>
</table>
</div>
<?php
}
As you can see. All Editors are in unvisible divs (display: none). If i now want to unhide this divs with javascript i get a JS Error in Line 22 of FCKEditor.
Anything what i make wrong??
TImo
RE: FCKEditor in hidden div
I'm not sure what the problem is, I don't know any PHP ... but you might consider creating them in seperate IFRAME's
Check out my demo here.
http://publicdemo.dev.lateralsystems.ne ... e_demo.htm
RE: FCKEditor in hidden div
I'll send you my code example as soon as possible.
I think the problem in your code is that you initiliase more than one times in your loop a single Editor
if you see this line
$oFCKeditor = new FCKeditor('FCKeditor['.$objLanguage->getDatabaseId().']') ;
the oFCKeditor object has always the same name.
try to give a different name for created objects like
$oFCKeditor['.$objLanguage->getDatabaseId().']' = new FCKeditor('FCKeditor['.$objLanguage->getDatabaseId().']') ;
to get output html code like this
oFCKeditorEN = new FCKeditor('FCKeditorEN') ;