<?php
if ( defined('class_editor_inc') )
	return false;
define('class_editor_inc',1);

class editor{
  function s_view($name,$text,$class){
    global $TMPL;
   $TMPL -> set_global_var('main_js_files','<script type="text/javascript" src="'.MAIN_SOURCE_URL.'/ext/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>',true);
   return '<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "exact",
		elements : "'.$name.'",
		theme : "simple",
		language : "ru",
	
		
	});
</script>'.control::textarea($name,$text,$class,'id="'.$name.'"');
	
  
  }
  
  function view($name,$text,$class){
   global $TMPL;
   $TMPL -> set_global_var('main_js_files','<script type="text/javascript" src="'.MAIN_SOURCE_URL.'/ext/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>',true);
   return '<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "exact",
		elements : "'.$name.'",
		theme : "advanced",
	language : "ru",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
	});
</script>'.control::textarea($name,$text,$class,'id="'.$name.'"');
	
  }
}
?>