Hi there,
I'm developing a website in which different users may use a different CKeditor (With a different toolbar).
This is what I put in my config.js (based on other information on this forum)
Now in my php script I generate a textarea with either Toolbar 1 or toolbar 2:
or
based on user permissions...
In my page footer I have the following code
The problem is that only Toolbar1 is working...
I'm developing on windows 7, IE9, XAMPP (Apache platform)
Can anybody tell me how to get two different toolbars working?
I'm developing a website in which different users may use a different CKeditor (With a different toolbar).
This is what I put in my config.js (based on other information on this forum)
config.toolbar_Toolbar1 =
[
{ name: 'document', items : [ 'NewPage','Preview' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-,'Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'
,'Iframe','MediaEmbed' ] },
'/',
{ name: 'styles', items : [ 'Format' ] },
{ name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'tools', items : [ 'Maximize' ] }
];
config.toolbar_Toolbar2 =
[
{ name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
{ name: 'tools', items : [ 'Maximize' ] }
];
Now in my php script I generate a textarea with either Toolbar 1 or toolbar 2:
$CKEditor = new CKEditor(); echo "<textarea class='ckeditor' id='editor1' name='editor1'>".$tekst."</textarea>";
or
$CKEditor = new CKEditor(); echo "<textarea class='ckeditor' id='editor2' name='editor2'>".$tekst."</textarea>";
based on user permissions...
In my page footer I have the following code
<script type="text/javascript">
CKEDITOR.replace( 'editor1',
{
toolbar : 'Toolbar1'
});
CKEDITOR.replace( 'editor2',
{
toolbar : 'Toolbar2'
});
</script>The problem is that only Toolbar1 is working...
I'm developing on windows 7, IE9, XAMPP (Apache platform)
Can anybody tell me how to get two different toolbars working?

Try to use document.ready
Try to use document.ready function from jQuery:
<script type="text/javascript"> //<![CDATA[ $(document).ready(function() { CKEDITOR.replace( 'editor1', { toolbar: 'Toolbar1' }); CKEDITOR.replace( 'editor2', { toolbar: 'Toolbar2' }); }); //]]> </script>