mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Fixes #1155 - TinyMce not saving changes. Rolled back TinyMce to v4.0 before issue began.
This commit is contained in:
@@ -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','tiny_mce.js','jquery');
|
||||||
//e107::js('tinymce','wysiwyg.php','jquery',5);
|
//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);
|
e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5);
|
||||||
|
|
||||||
// Add to e107_config.php to view hidden content when TinyMce not saving correctly
|
// Add to e107_config.php to view hidden content when TinyMce not saving correctly
|
||||||
|
@@ -13,11 +13,8 @@
|
|||||||
(function() {
|
(function() {
|
||||||
tinymce.create('tinymce.plugins.e107Plugin', {
|
tinymce.create('tinymce.plugins.e107Plugin', {
|
||||||
|
|
||||||
|
|
||||||
init : function(ed,url) {
|
init : function(ed,url) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var t = this, dialect = ed.getParam('bbcode_dialect', 'e107').toLowerCase();
|
var t = this, dialect = ed.getParam('bbcode_dialect', 'e107').toLowerCase();
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +24,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ed.on('postProcess', function(e) {
|
ed.on('postProcess', function(e) {
|
||||||
|
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<tinymce name="Main Admin" version="4">
|
<tinymce name="Main Admin" version="4">
|
||||||
<plugins>advlist autolink autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen
|
<plugins>advlist autolink autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualchars code fullscreen
|
||||||
insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor emoticons </plugins>
|
insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor </plugins>
|
||||||
<menubar>edit view format insert table tools</menubar>
|
<menubar>edit view format insert table tools</menubar>
|
||||||
<toolbar1>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</toolbar1>
|
<toolbar1>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</toolbar1>
|
||||||
<external_plugins>e107 example compat3x</external_plugins>
|
<external_plugins>e107 compat3x</external_plugins>
|
||||||
<image_advtab>true</image_advtab>
|
<image_advtab>true</image_advtab>
|
||||||
<extended_valid_elements>i[*], object[*],embed[*],bbcode[*]</extended_valid_elements>
|
<extended_valid_elements>i[*], object[*],embed[*],bbcode[*]</extended_valid_elements>
|
||||||
<templates>[
|
<templates>[
|
||||||
|
@@ -112,6 +112,8 @@ $wy = new wysiwyg();
|
|||||||
|
|
||||||
$gen = $wy->renderConfig();
|
$gen = $wy->renderConfig();
|
||||||
|
|
||||||
|
define('USE_GZIP', true);
|
||||||
|
|
||||||
|
|
||||||
if(ADMIN && e_QUERY == 'debug')
|
if(ADMIN && e_QUERY == 'debug')
|
||||||
{
|
{
|
||||||
@@ -131,11 +133,8 @@ if(ADMIN && e_QUERY == 'debug')
|
|||||||
require_once(FOOTERF);
|
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-type: text/javascript', TRUE);
|
||||||
header('Content-Encoding: gzip');
|
header('Content-Encoding: gzip');
|
||||||
|
|
||||||
@@ -145,7 +144,13 @@ else
|
|||||||
header('Content-Length: '.strlen($gzipoutput));
|
header('Content-Length: '.strlen($gzipoutput));
|
||||||
echo $gzipoutput;
|
echo $gzipoutput;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
ob_implicit_flush(0);
|
||||||
|
header('Content-type: text/javascript', TRUE);
|
||||||
|
echo $gen;
|
||||||
|
}
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
@@ -331,18 +336,26 @@ class wysiwyg
|
|||||||
$ret = array(
|
$ret = array(
|
||||||
'selector' => '.e-wysiwyg',
|
'selector' => '.e-wysiwyg',
|
||||||
// 'editor_selector' => 'advancedEditor',
|
// 'editor_selector' => 'advancedEditor',
|
||||||
'plugins' => $this->filter_plugins($config['tinymce_plugins']),
|
|
||||||
'language' => $this->tinymce_lang()
|
'language' => $this->tinymce_lang()
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Loop thru XML parms.
|
// Loop thru XML parms.
|
||||||
foreach($config as $k=>$xml)
|
foreach($config as $k=>$xml)
|
||||||
|
{
|
||||||
|
if($k == 'plugins')
|
||||||
|
{
|
||||||
|
$ret[$k] = $this->filter_plugins($xml);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$ret[$k] = $xml;
|
$ret[$k] = $xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$tPref = e107::pref('tinymce4');
|
$tPref = e107::pref('tinymce4');
|
||||||
|
|
||||||
if(!empty($tPref['paste_as_text']))
|
if(!empty($tPref['paste_as_text']))
|
||||||
@@ -770,7 +783,7 @@ class wysiwyg
|
|||||||
|
|
||||||
$admin_only = array("ibrowser");
|
$admin_only = array("ibrowser");
|
||||||
|
|
||||||
$plug_array = explode(",",$plugs);
|
$plug_array = explode(" ",$plugs);
|
||||||
|
|
||||||
$tinymce_plugins = array();
|
$tinymce_plugins = array();
|
||||||
|
|
||||||
@@ -786,18 +799,24 @@ class wysiwyg
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tinymce_plugins[] = $val;
|
if(!empty($val))
|
||||||
|
{
|
||||||
|
$tinymce_plugins[$val] = trim($val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$tPref = e107::pref('tinymce4');
|
$tPref = e107::pref('tinymce4');
|
||||||
|
|
||||||
|
|
||||||
if(!empty($tPref['visualblocks']))
|
if(!empty($tPref['visualblocks']))
|
||||||
{
|
{
|
||||||
$tinymce_plugins[] = 'visualblocks';
|
$tinymce_plugins['visualblocks'] = 'visualblocks';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $tinymce_plugins;
|
// print_a($tinymce_plugins);
|
||||||
|
|
||||||
|
return implode(" ",$tinymce_plugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user