1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Issue #1155 - debugging options added.

This commit is contained in:
Cameron
2015-08-18 13:18:54 -07:00
parent 4ffb3ab2c4
commit 215b539675
3 changed files with 42 additions and 13 deletions

View File

@@ -19,12 +19,23 @@ 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.2/tinymce.min.js");
e107::js('footer', "https://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'});
// ");
// Add to e107_config.php to view hidden content when TinyMce not saving correctly
if(deftrue('e_TINYMCE_DEBUG'))
{
e107::js('footer-inline', '
window.onload = function () {
$("textarea.e-wysiwyg").css("display","block");
$("textarea.e-wysiwyg").css("visibility","inherit");
}
');
}
}
else
@@ -101,7 +112,8 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
$('#uiModal').modal('hide');
return true;
});*/
});
*/

View File

@@ -29,6 +29,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
if (e.set) {
e.content = t['_' + dialect + '_bbcode2html'](e.content, url);
}
@@ -36,6 +40,8 @@
if (e.get) {
e.content = t['_' + dialect + '_html2bbcode'](e.content, url);
}
});
/*

View File

@@ -166,11 +166,16 @@ 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 .= "save_onsavecallback: function() {console.log('Save'); },\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});";
@@ -325,7 +330,7 @@ class wysiwyg
$ret = array(
'selector' => '.e-wysiwyg',
// 'editor_selector' => 'advancedEditor',
'plugins' => $this->filter_plugins($config['tinymce_plugins']),
'language' => $this->tinymce_lang()
@@ -356,6 +361,12 @@ class wysiwyg
$ret['visualblocks_default_state'] = true;
}
$ret['autosave_ask_before_unload'] = true;
$ret['autosave_retention'] = "30m";
$ret['autosave_interval'] = "3s";
$ret['autosave_prefix'] = "tinymce-autosave-{path}{query}-{id}-";
$ret['verify_html'] = false;
// plugins: "visualblocks",
@@ -680,7 +691,7 @@ class wysiwyg
'apply_source_formatting' => 'true',
'invalid_elements' => 'font,align,script,applet',
'auto_cleanup_word' => 'true',
'cleanup' => 'true',
// 'cleanup' => 'true',
'convert_fonts_to_spans' => 'true',
// 'content_css' => $tp->replaceConstants($content_css),
'popup_css' => 'false',