From 585cae01ad3aaf670e2bef3f876fe47d504e1e17 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 28 Jul 2015 10:04:17 -0700 Subject: [PATCH] Issue #1155, Issue #1035, and possibly related to Issue #928. These changes are precautions. Still not sure what is causing it. --- e107_handlers/form_handler.php | 16 +++++++++++++--- e107_handlers/js_manager.php | 2 +- e107_plugins/tinymce4/e_footer.php | 4 +++- e107_plugins/tinymce4/wysiwyg.php | 8 +++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index bfb7fa43c..f4aff89b8 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1395,8 +1395,18 @@ class e_form $bbbar = ''; - $help_tagid = $this->name2id($name)."--preview"; - $options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' {$height}"; + $help_tagid = $this->name2id($name)."--preview"; + + + if(e107::wysiwyg(true) === false) // bbarea loaded, so activate wysiwyg (if enabled in preferences) + { + $options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' {$height}"; + } + else + { + $options['other'] = " ".$height; + } + $counter = vartrue($options['counter'],false); @@ -1411,7 +1421,7 @@ class e_form $_SESSION['media_category'] = $mediaCat; // used by TinyMce. - e107::wysiwyg(true); // bbarea loaded, so activate wysiwyg (if enabled in preferences) + return $ret; diff --git a/e107_handlers/js_manager.php b/e107_handlers/js_manager.php index b5d668f70..611443859 100644 --- a/e107_handlers/js_manager.php +++ b/e107_handlers/js_manager.php @@ -244,7 +244,7 @@ class e_jsmanager if(e107::getPref('admintheme')=='bootstrap3') // Bootstrap 3 admin area. { $this->_libraries['jquery'] = array( - "http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js", + "http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css", // "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js", diff --git a/e107_plugins/tinymce4/e_footer.php b/e107_plugins/tinymce4/e_footer.php index 1810a865c..9619cc8ff 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', "http://tinymce.cachefly.net/4.1/tinymce.min.js"); + e107::js('footer', "http://tinymce.cachefly.net/4.2/tinymce.min.js"); e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5); // e107::js('inline', " // tinymce.init({selector:'.e-wysiwyg'}); @@ -85,6 +85,8 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL return false; }); + + /* $('img.tinyInsertEmote').live('click',function() { diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index cd8e5ad78..bdd500794 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -166,7 +166,13 @@ class wysiwyg $this->getConfig($config); $text = "\n /* TinyMce Config: ".$this->configName." */\n\n"; $text .= "tinymce.init({\n"; + /* $text .= "setup: function (editor) { + editor.on('blur', function () { + editor.save(); + }); + },\n";*/ $text .= $this->config; // Moc: temporary fix for BC with PHP 5.3: https://github.com/e107inc/e107/issues/614 + $text .= "\n});"; @@ -319,7 +325,7 @@ class wysiwyg $ret = array( 'selector' => '.e-wysiwyg', - 'theme' => 'modern', + 'plugins' => $this->filter_plugins($config['tinymce_plugins']), 'language' => $this->tinymce_lang()