/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	//config.language = 'fr';
	//config.uiColor = '#AADC6E';
	//config.filebrowserUploadUrl="ckeditorUpload";
	//config.filebrowserBrowseUrl = "/upload.php?/ckfinder.html";
    //config.filebrowserImageBrowseUrl = "/admin/index.php/uploadfile/?type=img";
	//alert(webroot_url+"/admin/index.php/upload/uploadfile");

	if(webroot_url !='')
	{
		config.filebrowserImageUploadUrl = webroot_url+"/adminsys/?load=upload";
		config.filebrowserImageBrowseUrl = webroot_url+"/adminsys/?load=filelist";
	}else{
		config.filebrowserImageUploadUrl = "/adminsys/?load=upload";
		config.filebrowserImageBrowseUrl = "/adminsys/?load=filelist";
	}
	
	//config.filebrowserFlashBrowseUrl = "/admin/upload.php?type=flash";
	//config.filebrowserFlashUploadUrl="/admin/upload.php?type=flash";
	
	config.skin='v2';
	
	config.toolbar = 'Basic'; 
	config.toolbar = 'Full';
	///这将配合
	config.toolbar_Full = [ 
	['Source','-','NewPage','Preview','-','Print', 'Templates'],  //'Save',
	['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], 
	['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
	['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], 
	/*
	['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], 
	*/
	'/', 
	['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], ['Link','Unlink','Anchor'], 
	['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 
	['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], 
	['Styles','Format','Font','FontSize'], 	['TextColor','BGColor'] ,
	];

	config.toolbar_Other = [ 
	['Source','-','NewPage','Preview','-','Print', 'Templates'],  //'Save',
	['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], 
	['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
	['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], 
	['Link','Unlink','Anchor'], 
	['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], 
	'/',  
	['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], 
	['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 
	['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], 
	['Styles','Format','Font','FontSize'], 
	['TextColor','BGColor'] ,
	];
 
 
config.toolbar_FullFull =
[
    { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
    { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
    { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
    { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
    '/',
    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
    { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
    '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
    { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
    { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
    '/',
    { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
    { name: 'colors', items : [ 'TextColor','BGColor' ] },
    { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];
 
config.toolbar_BasicBasic =
[
    ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
];

};
///CKEDITOR.replace( 'editor1',    {        toolbar : 'MyToolbar'    });CKEDITOR.replace( 'editor2',    {        toolbar : 'Basic'    });
