﻿function setupTiny() {
    tinyMCE.init({
      mode : "textareas",
      theme : "advanced",
      language: "cs",
      content_css : "css/example.css",
      plugins : "safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,insertdatetime,media,searchreplace,print,contextmenu,paste,fullscreen,visualchars,nonbreaking,xhtmlxtras", //preview,
      theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
      theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help",
      theme_advanced_buttons3 : "tablecontrols,|,hr,advhr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,|",
      theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,insertdate,inserttime,|,fullscreen,preview,print",
      theme_advanced_toolbar_location : "top",
      theme_advanced_toolbar_align : "left",
      theme_advanced_statusbar_location : "bottom",
      theme_advanced_resizing : true
   });
}
function preSave(){    
    document.getElementById('ctl00_c_TextContent').value = tinyMCE.get('Editor').getContent();
//    var o = document.getElementById('ctl00_c_TextContent').value;
//    var cnt = tinyMCE.get('Editor');
//    if (cnt) document.getElementById('ctl00_c_TextContent').value = cnt.getContent();
//        else document.getElementById('ctl00_c_TextContent').value = document.getElementById('Editor').value;
}
