<?php
$remove = 'Save,NewPage,Preview,Print,Templates,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CreateDiv,BidiLtr,BidiRtl,Anchor,Image,Flash,Table,Smiley,SpecialChar,PageBreak,Iframe,ShowBlocks,About,Language';

if(!User::isAdmin()) {
	$remove .= ",Source";
}
if(!in_array(USer::getPrivilegio(), array(1, 7, 20))) {
	$remove .= ",PasteFromWord,Source,Superscript,Subscript,JustifyBlock,JustifyRight,JustifyCenter,JustifyLeft,Blockquote,Outdent,Indent,FontSize,Font,Format,Styles,BGColor,TextColor";
}
?>
<script type="text/javascript">

CKEDITOR.config.language = 'pt-br';
CKEDITOR.config.defaultLanguage = 'pt-br';
CKEDITOR.config.toolbarCanCollapse = true;

CKEDITOR.config.toolbarGroups = [
	{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
	{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
	{ name: 'editing', groups: [ 'find', 'selection', 'editing' ] },
	{ name: 'forms', groups: [ 'forms' ] },
	{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
	{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
	{ name: 'links', groups: [ 'links' ] },
	{ name: 'insert', groups: [ 'insert' ] },
	{ name: 'styles', groups: [ 'styles' ] },
	{ name: 'colors', groups: [ 'colors' ] },
	{ name: 'tools', groups: [ 'tools' ] },
	{ name: 'others', groups: [ 'others' ] },
	{ name: 'about', groups: [ 'about' ] }
];

CKEDITOR.config.removeButtons = '<?php echo $remove; ?>';
</script>