mirror of
https://github.com/e107inc/e107.git
synced 2025-08-30 09:39:55 +02:00
TinyMce upgraded to v4.2 and no-save issue corrected. Old files removed.
This commit is contained in:
@@ -17,10 +17,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
{
|
||||
if(e_PAGE != 'image.php')
|
||||
{
|
||||
//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', "https://tinymce.cachefly.net/4.2/tinymce.min.js");
|
||||
e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5);
|
||||
|
||||
// Add to e107_config.php to view hidden content when TinyMce not saving correctly
|
||||
@@ -48,8 +45,8 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
if(ADMIN)
|
||||
{
|
||||
$insert = "$('#'+id).after('<div>";
|
||||
$insert .= "<a href=\"#\" id=\"' + id + '\" class=\"e-wysiwyg-toggle btn btn-xs btn-default btn-inverse btn-mini\">Switch to bbcode<\/a>";
|
||||
|
||||
|
||||
|
||||
if(e_PAGE == 'mailout.php')
|
||||
{
|
||||
$insert .= " <a href=\"#\" class=\"btn btn-mini tinyInsert\" data-value=\"|USERNAME|\" >".LAN_MAILOUT_16."<\/a>";
|
||||
@@ -83,9 +80,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
$('.e-wysiwyg').each(function() {
|
||||
|
||||
var id = $(this).attr('id'); // 'e-wysiwyg';
|
||||
console.log(id);
|
||||
".SWITCH_TO_BB."
|
||||
// alert(id);
|
||||
$('#bbcode-panel-'+id+'--preview').hide();
|
||||
|
||||
});
|
||||
@@ -98,27 +93,6 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
});
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$('img.tinyInsertEmote').live('click',function() {
|
||||
|
||||
var src = $(this).attr('src');
|
||||
// alert(src);
|
||||
// var html = '<img src=\''+src +'\' alt=\'emote\' />';
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false, 'hi there');
|
||||
;
|
||||
$('.mceContentBody', window.top.document).tinymce().execCommand('mceInsertContent',false,src);
|
||||
|
||||
// tinyMCE.selectedInstance.execCommand('mceInsertContent',0,src);
|
||||
|
||||
$('#uiModal').modal('hide');
|
||||
return true;
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
// When new tab is added - convert textarea to TinyMce.
|
||||
$('.e-tabs-add').on('click',function(){
|
||||
|
||||
@@ -133,28 +107,6 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
});
|
||||
|
||||
|
||||
$('a.e-wysiwyg-toggle').toggle(function(){
|
||||
|
||||
var id = $(this).attr('id'); // eg. news-body
|
||||
|
||||
$('#bbcode-panel-'+id+'--preview').show();
|
||||
$(this).text('Switch to wysiwyg');
|
||||
|
||||
tinymce.EditorManager.execCommand('mceRemoveEditor',true, id); //v4.x
|
||||
|
||||
// tinymce.remove('#'+id);
|
||||
// tinymce.activeEditor.execCommand('mceRemoveControl', false, id);
|
||||
// $('#'+id).tinymce().remove();
|
||||
|
||||
}, function () {
|
||||
var id = $(this).attr('id');
|
||||
$('#bbcode-panel-'+id+'--preview').hide();
|
||||
$(this).text('Switch to bbcode');
|
||||
tinymce.EditorManager.execCommand('mceAddEditor',true, id); //v4.x
|
||||
// tinymce.remove('#'+id);
|
||||
// tinymce.activeEditor.execCommand('mceAddControl', false, id);
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click','.e-dialog-save', function(){
|
||||
// var html = $('#html_holder').val();
|
||||
|
Reference in New Issue
Block a user