tinyMCE.init({
    mode: 'specific_textareas',
    editor_selector: 'contentelement_htmlarea',
    language: 'nl',
    remove_trailing_nbsp : true,
    convert_urls : false,
    plugins: "advimage,advhr,contextmenu,directionality,emotions,fullscreen,inlinepopups,insertdatetime,layer,l24_images,media,nonbreaking,noneditable,pagebreak,paste,preview,print,safari,save,searchreplace,style,table,template,visualchars,xhtmlxtras",
    extended_valid_elements: "iframe[src|width|height|name|align]",
    element_format: 'html',
    theme: "advanced",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,l24_images,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
    theme_advanced_buttons4 : "moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,blockquote,pagebreak",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    height: 460
});

//init readonly HTML areas
tinyMCE.init({
   mode: 'specific_textareas',
   editor_selector: 'htmlarea readonly',
   theme: 'advanced',
   readonly: true,
   convert_urls : false
});

// init Professional HTML areas
tinyMCE.init({
   mode: 'specific_textareas',
   editor_selector: 'prof_htmlarea',
   editor_deselector: 'readonly',
   plugins: 'inlinepopups, addlink, contextmenu, advimage, l24_images, paste',
   language: 'nl', 
   button_tile_map: true,
   remove_trailing_nbsp : true,
   paste_create_paragraphs: false,
   // If you add elements here, you have to add them above and below and to HTMLFilterUtil.java
   valid_elements: 'p,h3,br,ol,ul,li,en,strong,img[class|alt|src|style|width|height],a[href|title|class|name|target],em/i,strong/b,sup,sub,object[classid|width|height|codebase],param[name|value],embed[type|width|height|src]',
   theme: 'advanced',
   theme_advanced_toolbar_location: 'top',
   theme_advanced_toolbar_align: 'left',
   theme_advanced_buttons1:
      'formatselect, bold, italic, separator,'+
      'bullist, numlist, separator,'+
      'cut, copy, paste, pasteword, separator,'+
      'link, unlink, anchor, l24_images, media, charmap, separator,'+
      'undo, redo, separator,'+
      'cleanup',
   theme_advanced_buttons2: '',
   theme_advanced_buttons3: '',
   theme_advanced_blockformats: 'p, h3',
   convert_urls : false
});

// init UGC HTML areas (other editor_selector)
// Different buttons: No image, split over two toolbar lines
tinyMCE.init({
   mode: 'specific_textareas',
   editor_selector: 'ugc_htmlarea',
   editor_deselector: 'readonly',
   plugins: 'addlink',
   addlink_showzoekso: 'no',
   language: 'nl',
   button_tile_map: true,
   remove_trailing_nbsp : true,
   paste_create_paragraphs: false,
   // If you add elements here, you have to add them above (2x) and to HTMLFilterUtil.java
   valid_elements: 'p,h3,br,ol,ul,li,en,strong,img[class|alt|src|style|width|height],a[href|title|class|name|target],em/i,strong/b,sup,sub,object[classid|width|height|codebase],param[name|value],embed[type|width|height|src]',
   theme: 'advanced',
   theme_advanced_toolbar_location: 'top',
   theme_advanced_toolbar_align: 'left',
   theme_advanced_buttons1:
      'formatselect, bold, italic, separator,'+
      'bullist, numlist, separator,'+
      'cut, copy, paste',      
   theme_advanced_buttons2: 'link, unlink, anchor, media, charmap,'+ 
        'separator, undo, redo, separator,cleanup',
   theme_advanced_buttons3: '',
   theme_advanced_blockformats: 'p, h3',
   convert_urls : false
});
