Hello,
I am trying to load different toolbar sets based on the user's type and it doesn't seem to be working. It only loads the 'CMSlight' toolbar. I feel like I am missing something simple. (currently, the only difference between the two toolbars is the 'source' button)
How can I make this work?
I am trying to load different toolbar sets based on the user's type and it doesn't seem to be working. It only loads the 'CMSlight' toolbar. I feel like I am missing something simple. (currently, the only difference between the two toolbars is the 'source' button)
How can I make this work?
<script> <cfif session.userType EQ "Admin"> CKEDITOR.replace('CMSeditor',{toolbar : 'CMSadmin'}); <cfelse> CKEDITOR.replace('CMSeditor',{toolbar : 'CMSlight'}); </cfif> </script>
config.toolbar = 'CMSlight'; config.toolbar_CMSlight = [ { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','SpecialChar','PageBreak','Iframe' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, '/', { name: 'styles', items : [ 'Styles'] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] }, { name: 'tools', items : [ 'ShowBlocks','-','About' ] } ]; config.toolbar_CMSadmin = [ { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','SpecialChar','PageBreak','Iframe' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'document', items : [ 'Source'] }, '/', { name: 'styles', items : [ 'Styles'] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] }, { name: 'tools', items : [ 'ShowBlocks','-','About' ] } ];
Re: Load different toolbars based on user type