tinyMCE.init({
	mode : "textareas",
	theme : "simple",
	editor_selector : "MCEsimple",

});

function trimSaveContent(element_id, html, body) {
    html = html.replace(/<!--.*?-->/g,'');
    return html;
}


tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		editor_selector : "MCEadvanced",
		theme_advanced_toolbar_location : "top", // position de barre d'outils
		theme_advanced_toolbar_align : "left", // alignement des boutons sur les barre d'outils
		plugins : "advimage,fullscreen,preview,emotions,insertdatetime,save, , table, searchreplace,inlinepopups, paste, imagemanager",
		theme_advanced_buttons1 : "save, cancel,spellchecker,cleanup, removeformat,,fullscreen,fullpage,preview,|,undo,redo,|, copy, cut, paste,pastetext, pasteword,|,search,replace",
		theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,forecolor,backcolor,forecolorpicker, backcolorpicker ,|,justifyleft,justifycenter,justifyright, justifyfull,|,outdent,indent,|,sub,sup,|",
		theme_advanced_buttons3 : "tablecontrols,|,bullist,numlist,|,insertdate,inserttime,|,image,charmap,emotions,|,link,unlink,|",
		theme_advanced_disable : "spellchecker, forecolorpicker,backcolorpicker, preview", // boutons desactivé
		verify_html : true,  
		dialog_type : "modal",
		force_br_newlines : true, //force lamise en place de balise br alors de nouvelle ligne
		forced_root_block : '', // obligatoire pour les 
		apply_source_formatting : true, //Retourn les source avec indentation
		fix_table_elements : true, //fixe les bug de validite dans les tables
		fix_list_elements : true, // Fixe les bug de validité dans les listes
		fix_nesting : true, //Fxe les bug de validité <p><b></p></b> en <p><b></b></p>
		//encoding : "xml", // convertion  les < > " ' en caractère xml &lt;  &gt;  &quot
		convert_newlines_to_brs : false, //convertion \n en <br />
		extended_valid_elements :"hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],a[href|name], br,i,u,li,ul,",
		language : "fr",
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		theme_advanced_statusbar_location : "bottom",
		spellchecker_languages : "+Français=fr,English=en",
		save_callback: "trimSaveContent"
	});

