diff --git a/e107_plugins/tinymce4/e_footer.php b/e107_plugins/tinymce4/e_footer.php index 5c49a229d..c8fdaaa31 100644 --- a/e107_plugins/tinymce4/e_footer.php +++ b/e107_plugins/tinymce4/e_footer.php @@ -19,7 +19,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL //e107::js('tinymce','tiny_mce.js','jquery'); //e107::js('tinymce','wysiwyg.php','jquery',5); - e107::js('footer', "https://tinymce.cachefly.net/4.2/tinymce.min.js"); + e107::js('footer', "https://tinymce.cachefly.net/4.0/tinymce.min.js"); // 4.1 and 4.2 have issues with saving under Firefox. http://www.tinymce.com/develop/bugtracker_view.php?id=7655 e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5); // Add to e107_config.php to view hidden content when TinyMce not saving correctly diff --git a/e107_plugins/tinymce4/plugins/e107/plugin.js b/e107_plugins/tinymce4/plugins/e107/plugin.js index 48eb72f72..00c82c1fc 100644 --- a/e107_plugins/tinymce4/plugins/e107/plugin.js +++ b/e107_plugins/tinymce4/plugins/e107/plugin.js @@ -12,12 +12,9 @@ (function() { tinymce.create('tinymce.plugins.e107Plugin', { - init : function(ed,url) { - - - + var t = this, dialect = ed.getParam('bbcode_dialect', 'e107').toLowerCase(); @@ -27,11 +24,10 @@ - ed.on('postProcess', function(e) { - // console.log(e); - // alert(e.content); // remove comment to test Firefox issue: http://www.tinymce.com/develop/bugtracker_view.php?id=7655 + // console.log(e); + // alert(e.content); // remove comment to test Firefox issue: http://www.tinymce.com/develop/bugtracker_view.php?id=7655 if (e.set) { e.content = t['_' + dialect + '_bbcode2html'](e.content, url); diff --git a/e107_plugins/tinymce4/templates/mainadmin.xml b/e107_plugins/tinymce4/templates/mainadmin.xml index a5f428cff..b5608e416 100644 --- a/e107_plugins/tinymce4/templates/mainadmin.xml +++ b/e107_plugins/tinymce4/templates/mainadmin.xml @@ -1,10 +1,10 @@ - advlist autolink autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen - insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor emoticons + advlist autolink autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualchars code fullscreen + insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor edit view format insert table tools undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | e107-image e107-video e107-bbcode smileys | preview - e107 example compat3x + e107 compat3x true i[*], object[*],embed[*],bbcode[*] [ diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index be3632e94..d31c4865a 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -112,6 +112,8 @@ $wy = new wysiwyg(); $gen = $wy->renderConfig(); +define('USE_GZIP', true); + if(ADMIN && e_QUERY == 'debug') { @@ -131,11 +133,8 @@ if(ADMIN && e_QUERY == 'debug') require_once(FOOTERF); } -else +elseif(USE_GZIP === true) { - //ob_start(); - //ob_implicit_flush(0); - //header("last-modified: " . gmdate("D, d M Y H:i:s",mktime(0,0,0,15,2,2004)) . " GMT"); header('Content-type: text/javascript', TRUE); header('Content-Encoding: gzip'); @@ -145,7 +144,13 @@ else header('Content-Length: '.strlen($gzipoutput)); echo $gzipoutput; } - +else +{ + ob_start(); + ob_implicit_flush(0); + header('Content-type: text/javascript', TRUE); + echo $gen; +} exit; @@ -331,16 +336,24 @@ class wysiwyg $ret = array( 'selector' => '.e-wysiwyg', // 'editor_selector' => 'advancedEditor', - 'plugins' => $this->filter_plugins($config['tinymce_plugins']), 'language' => $this->tinymce_lang() ); + // Loop thru XML parms. foreach($config as $k=>$xml) { - $ret[$k] = $xml; + if($k == 'plugins') + { + $ret[$k] = $this->filter_plugins($xml); + } + else + { + $ret[$k] = $xml; + } + } $tPref = e107::pref('tinymce4'); @@ -770,7 +783,7 @@ class wysiwyg $admin_only = array("ibrowser"); - $plug_array = explode(",",$plugs); + $plug_array = explode(" ",$plugs); $tinymce_plugins = array(); @@ -786,18 +799,24 @@ class wysiwyg continue; } - $tinymce_plugins[] = $val; + if(!empty($val)) + { + $tinymce_plugins[$val] = trim($val); + } } $tPref = e107::pref('tinymce4'); + if(!empty($tPref['visualblocks'])) { - $tinymce_plugins[] = 'visualblocks'; + $tinymce_plugins['visualblocks'] = 'visualblocks'; } - return $tinymce_plugins; + // print_a($tinymce_plugins); + + return implode(" ",$tinymce_plugins); }