<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
?>

	<script type="text/javascript" src="<?= $editor_config['url'] ?>tinymce/tinymce.min.js"></script>
	<!--<script type="text/javascript" src="<?= $editor_config['url'] ?>tinymce/jquery.tinymce.min.js"></script>-->	
<script type="text/javascript">

	tinymce.init({
    selector: "textarea#elm1",    language: "ru",    theme: "modern",    convert_urls: false,    height: 300,
    plugins: ["advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
         "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
         "colorpicker fullpage fullscreen imagetools importcss autosave",
         "save table contextmenu directionality emoticons template paste textcolor responsivefilemanager sh4tinymce"   ],
    image_advtab: true,
    content_css:"<?= getinfo('plugins_url') ?>editor_tinymce/editor-style.css",<?php $path_tpl = getinfo('require-maxsite') 	. base64_encode	(		'plugins/editor_tinymce/template_list-require-maxsite.php'	);?>		template_external_list_url : "<?= $path_tpl ?>",
    toolbar: "insertfile undo redo | styleselect | bold italic underline blockquote | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media fullpage | forecolor backcolor emoticons | pagebreak | sh4tinymce code",
   
	/* следующий блок для подключения filemanager*/
	external_filemanager_path:"/filemanager/",
	filemanager_title:"Менеджер файлов" ,
	external_plugins: { "filemanager" : "/filemanager/plugin.min.js"},
    
    style_formats: [        {title: 'Bold text', inline: 'b'},
        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
        {title: 'Example 1', inline: 'span', classes: 'example1'},
        {title: 'Example 2', inline: 'span', classes: 'example2'},
        {title: 'Table styles'},
        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}    ]	});
	</script><?= $editor_config['do_script'] ?><form id="form_editor" method="post" <?= $editor_config['action'] ?> enctype="multipart/form-data"><?= $editor_config['do'] ?><textarea id="elm1" name="f_content" style="height: <?= $editor_config['height'] ?>px; width: 100%;" ><?= $editor_config['content'] ?></textarea><?= $editor_config['posle'] ?></form>
<script type="text/javascript">	$('#bsave').on('click',function(){tinymce.each(tinymce.editors, function (t) {t.save();});});</script>	
