//parametres de configuration 3 pour l'AO (en autres)
//05/03/2007
//identique au Bo client, sauf que les icones disponible sont plus reduites, une seule ligne
tinyMCE.init({
  mode : "specific_textareas",
  editor_selector : "mceEditor",
  plugins : "autosave,contextmenu,fullscreen,paste,searchreplace,table",
  button_tile_map : true,
  convert_fonts_to_spans : true, //true but buggy, requires the cleanup_on_startup
  cleanup_on_startup : true, //true for now until the bug of the colors is fixed (1660832)
  force_p_newlines : true,
  force_br_newlines : false,
  convert_newlines_to_brs : false,
  font_size_style_values : "xx-small,normal,medium,x-large", //list of font style to be applied by the drop down list (0, 1, 2)

  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : true,
  theme_advanced_resize_horizontal : false,
  theme_advanced_buttons1 : "bold,italic,underline,justifyleft,justifycenter,justifyright,bullist,numlist,outdent,indent,fontsizeselect,forecolor,cut,copy,pasteword,undo,redo,help",
  theme_advanced_buttons2 : "",
  theme_advanced_buttons3 : "",
  invalid_elements : "img", //exclude images from this config
  apply_source_formatting : true, //to indent the code source
  theme_advanced_blockformats : "h3,h4,h5,p", //elements to be displayed in the format list box

  paste_create_paragraphs : false,
	paste_auto_cleanup_on_paste : true,
	paste_convert_headers_to_strong : false,
	paste_convert_headers_down : 3,
	paste_remove_spans : true,
	paste_remove_styles : true,
	paste_strip_class_attributes : "all",

  handle_event_callback : "scoPasteHandleEvent", //function for forcing FF to open the Word paste popup
  language : "fr"
});

function scoPasteHandleEvent(e) {
if (e.ctrlKey && e.keyCode == 86 && e.type != "keyup") {
                    if (e.preventDefault) {
                       e.preventDefault(); // DOM style
                       setTimeout('tinyMCE.execInstanceCommand(\"'+e.target.editorId+'\", \"mcePasteWord\", true)',1);
                    } else {
                       tinyMCE.execInstanceCommand(e.target.editorId, "mcePasteWord", true);
                       tinyMCE.cancelEvent(e);
                       return false; // IE style
                    }
                }
}

