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

CKEDITOR.editorConfig = function( config )
{
    config.extraPlugins="ResetText";
	// Define changes to default configuration here. For example:
	config.defaultLanguage = 'zh-cn';
	config.enterMode =CKEDITOR.ENTER_BR;
	config.shiftEnterMode =CKEDITOR.ENTER_P;
	// config.uiColor = '#AADC6E';
    config.tabSpaces = 2;
    config.fullPage =true;
    config.entities =false;
    
    config.skin='v2';  
    config.baseHref = '';

    config.protectedSource.push(/<!DOCTYPE[\s]*[^>]*>/gi);
    config.protectedSource.push(/(<html[\s]*[^>]*>)|(<\/html>)/gi);
    config.protectedSource.push(/<head[\s]*[^>]*>[\s\S]*?<\/head>/gi);
    config.protectedSource.push(/(<body[\s]*[^>]*>)|(<\/body>)/gi);
    config.protectedSource.push(/<!--[\s\S]*?-->/gi);   
    config.protectedSource.push(/<label[\s]*[^>]*>[\s\S]*?<\/label>/gi);
    config.protectedSource.push(/<script[\s\S]*?\/script>/gi);	// <SCRIPT> tags.
    config.protectedSource.push(/(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi);	// ASP.Net style tags <asp:control>
    
	config.filebrowserBrowseUrl = '/ckfinder/ckfinder.html';
    config.filebrowserImageBrowseUrl = '/ckfinder/ckfinder.html?Type=Images';
    config.filebrowserFlashBrowseUrl = '/ckfinder/ckfinder.html?Type=Flash';
    config.filebrowserUploadUrl = '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files';
    config.filebrowserImageUploadUrl = '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images';
    config.filebrowserFlashUploadUrl = '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash';
    config.filebrowserWindowWidth = '800';
    config.filebrowserWindowHeight = '500';
    
    config.toolbar=
    [ 
        ['Source','ResetText','-','Preview'],
        ['Cut','Copy','Paste','PasteText','PasteFromWord'],
        ['Undo','Redo'],       
        ['Image','Table','HorizontalRule','Smiley','SpecialChar'],  
        '/',
        ['Bold','Italic','Underline','Strike'],
        ['NumberedList','BulletedList'], 
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], 
        ['Link','Unlink'],      
        ['TextColor','BGColor']        
   ];    
};
