<?php
/*
	Stempora Web Framework
	Copyright (c) 2002-2016 Stempora. 
	All rights reserved.
		web:  www.stempora.com
		mail: support@stempora.com				
*/


//no cache for config
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

?>

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

CKEDITOR.dtd.$removeEmpty['b'] = false;
CKEDITOR.dtd.$removeEmpty['i'] = false;
CKEDITOR.dtd.$removeEmpty['span'] = false;




CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	//config.uiColor = '#28b779';

	config.fillEmptyBlocks = false;
	config.language = 'en';

<?php

	if (stristr($_SERVER["HTTP_REFERER"] , "mod=maintenance")) {
		echo "config.contentsCss = [ '../../../assets/maintenance/css/admin.php'];";
	} else {
		echo "config.contentsCss = [ '../../../assets/css/admin.php'];";
	}
?>

   config.filebrowserBrowseUrl = './3rdparty/filemanager/browse.php?opener=ckeditor&type=upload';
   config.filebrowserImageBrowseUrl = './3rdparty/filemanager/browse.php?opener=ckeditor&type=upload';
   config.filebrowserFlashBrowseUrl = './3rdparty/filemanager/browse.php?opener=ckeditor&type=upload';
   config.filebrowserUploadUrl = '';
   config.filebrowserImageUploadUrl = './3rdparty/filemanager/upload.php?opener=ckeditor&type=upload';
   config.filebrowserFlashUploadUrl = './3rdparty/filemanager/upload.php?opener=ckeditor&type=upload';


	config.toolbarGroups = [
		{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
		{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', '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' ] }
	];

	config.removeButtons = 'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Save,NewPage,Preview,Print,Undo,Redo,FontSize,Font,About,Flash,Smiley,Language,BidiRtl,BidiLtr,Styles,PageBreak,SelectAll';


	config.extraPlugins = 'codemirror,textselection,templates';
	//config.extraPlugins = 'autosave';
	//config.autosave_SaveKey = 'autosaveKey';
	//config.autosave_NotOlderThan = 1440;
	//config.autosave_saveOnDestroy = false;
	//config.autosave_saveDetectionSelectors = "a[href^='javascript:__doPostBack'][id*='Save'],a[id*='Cancel']";

	config.format_tags = 'p;h1;h2;h3;h4;pre;div';

};
