I am trying to place 2 instances of CKEditor on a web page, but when I do, only one displays. Here is my Code:
HTML:
JS:
What is the problem?
HTML:
<div id="smp_content_body"> <textarea name="content_body" id="content_body"><?php echo ($content_body?$content_body:$PAGE['content']); ?></textarea> </div> <div id="smp_content_sdbr"> <textarea name="content_sdbr" id="content_sdbr"><?php echo ($content_sdbr?$content_sdbr:$PAGE['sidebar']); ?></textarea> </div>
JS:
CKEDITOR.replace('content_body',{
<?php if(in_array('sm_fileManager',$MODS)){ ?>
filebrowserBrowseUrl : 'widgets/sm_fileManager/smFiles/index.php',
filebrowserUploadUrl : 'widgets/sm_fileManager/smFiles/index.php',
filebrowserImageBrowseUrl : 'widgets/sm_fileManager/smFiles/index.php?ftype=image',
filebrowserImageUploadUrl : 'widgets/sm_fileManager/smFiles/index.php?ftype=image',
filebrowserWindowWidth : '1000',
filebrowserWindowHeight : '870',
<?php } ?>
language:'<?php echo substr($CLIENT['lang'],0,2); ?>'
});
CKEDITOR.replace('content_sdbr',{
<?php if(in_array('sm_fileManager',$MODS)){ ?>
filebrowserBrowseUrl : 'widgets/sm_fileManager/smFiles/index.php',
filebrowserUploadUrl : 'widgets/sm_fileManager/smFiles/index.php',
filebrowserImageBrowseUrl : 'widgets/sm_fileManager/smFiles/index.php?ftype=image',
filebrowserImageUploadUrl : 'widgets/sm_fileManager/smFiles/index.php?ftype=image',
filebrowserWindowWidth : '1000',
filebrowserWindowHeight : '870',
<?php } ?>
language:'<?php echo substr($CLIENT['lang'],0,2); ?>'
});What is the problem?

Re: Multiple instances
$('textarea').ckeditor();$('#content_body').ckeditor(); $('#content_sdbr').ckeditor();$('#content_sdbr,#content_body').ckeditor();No matter how I do it, whichever textarea is references last disappears while the first one works fine.
Re: Multiple instances