I see a ton of posts on the problems with placing multiple editors in one page, but I haven't seen anything about how exactly to place multiple editors in one page? How does one do it?
I've tried many different ways of doing this but always get this error in the page where the second editor should be:
Fatal error: Cannot redeclare class fckeditor in /home/virtual/site155/FCKeditor/fckeditor.php on line 23
I tried renameing the second $oFCKeditor = new FCKeditor('fd_content') ; to $oFCKeditor2. I tried giving it an array like $oFCKeditor[1]. I tried uploading a whole new FCKeditor folder and setting the basepath to the new one. All of these methods give me the same fatal error.
Is it just not possible?
Thanks,
Julian
I've tried many different ways of doing this but always get this error in the page where the second editor should be:
Fatal error: Cannot redeclare class fckeditor in /home/virtual/site155/FCKeditor/fckeditor.php on line 23
I tried renameing the second $oFCKeditor = new FCKeditor('fd_content') ; to $oFCKeditor2. I tried giving it an array like $oFCKeditor[1]. I tried uploading a whole new FCKeditor folder and setting the basepath to the new one. All of these methods give me the same fatal error.
Is it just not possible?
Thanks,
Julian
RE: How to place multiple editors in one page
<script type="text/javascript" src="../fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'short' ) ;
oFCKeditor.BasePath = "/test/fckeditor/" ;
oFCKeditor.Height = 300;
oFCKeditor.ReplaceTextarea() ;
var oFCKeditor = new FCKeditor( 'long' ) ;
oFCKeditor.BasePath = "/test/fckeditor/" ;
oFCKeditor.Height = 500;
oFCKeditor.ReplaceTextarea() ;
}
</script>
and in <body>:
<textarea id="short" name="short" style="width:100%">
<?echo stripslashes($row['shortText'])?>
</textarea>
<textarea id="long" name="long" style="width:100%; height:100%">
<?echo stripslashes($row['content']) ?>
</textarea>
It works No problems