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

CKEDITOR.editorConfig = function(config) {
    config.filebrowserBrowseUrl = '/assets/plugins/kcfinder/browse.php?type=files';
    config.filebrowserImageBrowseUrl = '/assets/plugins/kcfinder/browse.php?type=images';
    config.filebrowserFlashBrowseUrl = '/assets/plugins/kcfinder/browse.php?type=flash';
    config.filebrowserUploadUrl = '/assets/plugins/kcfinder/upload.php?type=files';
    config.filebrowserImageUploadUrl = '/assets/plugins/kcfinder/upload.php?type=images';
    config.filebrowserFlashUploadUrl = '/assets/plugins/kcfinder/upload.php?type=flash';
    
    config.extraPlugins = 'iframe';

    // The toolbar groups arrangement, optimized for two toolbar rows.
    config.toolbar_RTpanel =
            [
                {name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', '-', 'RemoveFormat']},
                {name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'/*, '-', 'Blockquote'*/]},
                {name: 'links', items: ['Link', 'Unlink', 'Anchor']},
                {name: 'insert', items: ['Image', 'Table', 'Iframe']},
                // {name: 'styles', items: ['Format', 'Styles', 'FontSize']},
                {name: 'dev', items: ['Source']},
                {name: 'max', items: ['Maximize']}
            ];

    // Remove some buttons, provided by the standard plugins, which we don't
    // need to have in the Standard(s) toolbar.
    config.removeButtons = 'Underline,Subscript,Superscript';

    // Se the most common block elements.
    config.format_tags = 'p;h1;h2;h3;pre';

    // Make dialogs simpler.
    config.removeDialogTabs = 'image:advanced;link:advanced';

    config.enterMode = CKEDITOR.ENTER_BR;
};
