﻿function myCustomCleanup(type, value) {   

    if (type == "insert_to_editor")
     {   value = value.replace(/&lt;/gi,"<");
          value = value.replace(/&gt;/gi,">");
     }

     return value;
}
function myCustomSaveContent(element_id, html, body) {   
    html= html.replace(/</gi,"&lt;");
    html = html.replace(/>/gi, "&gt;");
   
     return html;
}

tinyMCE_GZ.init({
    plugins: "paste,media", //'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
    themes: "advanced",
    languages: "en",
    disk_cache: true,
    debug: false
});


// O2k7 skin (silver)
tinyMCE.init({
		// General options plugins : "simplepaste",init_instance_callback : "pasteAsText",
		mode : "exact",
		elements : tinyMCE_ST,
		plugins: "paste,media",			
	    paste_create_paragraphs : true,
	    paste_create_linebreaks : true,
	    paste_use_dialog: false,
	    convert_urls : false,
	    paste_auto_cleanup_on_paste : true,
	    paste_convert_middot_lists : false,
	    paste_unindented_list_class : "unindentedList",
	    paste_convert_headers_to_strong : true,  	    
		theme : "advanced",
		skin : "o2k7",
		skin_variant : "black",	
		// Theme options
		theme_advanced_buttons1: "bold,italic,underline,|,bullist,numlist,hr,|,justifyleft,justifycenter,justifyright,|,link,unlink,|,image,media,|,forecolor,backcolor,|,cleanup,|,pastetext,pasteword",
		theme_advanced_buttons2: "formatselect,fontselect,fontsizeselect,code",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing: true,				
		content_css : "/CSS/tinyMCE.css",
		cleanup_callback : "myCustomCleanup",
        save_callback : "myCustomSaveContent"
	});
	
	

