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

CKEDITOR.stylesSet.add( 'my_styles', [
    // Block-level styles.
    { 
    	name: '圖片說明', 
    	element: 'p', 
    	attributes: { 'class': 'photo-description' } 
    },{ 
        name: '棕色', 
        element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'b', 'strong', 'span'],  
        attributes: { 'class': 'text' } 
    },{ 
        name: '深棕色', 
        element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'b', 'strong', 'span'],  
        attributes: { 'class': 'text-dark' } 
    },{ 
        name: '橘色', 
        element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'b', 'strong', 'span'],  
        attributes: { 'class': 'text-orange' } 
    },{ 
        name: '深橘色', 
        element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'b', 'strong', 'span'],  
        attributes: { 'class': 'text-orange-dark' } 
    },{ 
        name: '深灰色', 
        element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'b', 'strong', 'span'],  
        attributes: { 'class': 'gray' } 
    },{ 
        name: '圖片外框', 
        element: 'img', 
        attributes: { 'class': 'border' } 
    }, { 
        name: '引用', 
        element: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'], 
        attributes: { 'class': 'blockquote' } 
    }
]);

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
};
/**
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here.
	// For complete reference see:
	// http://docs.ckeditor.com/#!/api/CKEDITOR.config

	// The toolbar groups arrangement, optimized for two toolbar rows.
	config.language = 'zh';
	config.stylesSet = 'my_styles';
	config.toolbarGroups = [
		// { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
		// { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'colors' },
		{ name: 'styles' },
		'/',
		{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
		// { name: 'forms' },
		{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'others' },
		'/',
		{ name: 'insert' },
		{ name: 'links' },
		// { name: 'tools' },
		// { name: 'about' }
	];
	
	// Remove some buttons provided by the standard plugins, which are
	// not needed in the Standard(s) toolbar.
	//config.removeButtons = 'Underline,Subscript,Superscript';

	// Set the most common block elements.
	config.contentsCss = '/ckeditor/contents.css';
	// config.extraPlugins = 'autogrow';
	config.autoGrow_minHeight = 300;
	config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre';
	config.disallowedContent = 'script';
	// Simplify the dialog windows.
	//config.removeDialogTabs = 'image:advanced;link:advanced';
};
