1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-18 00:06:26 +02:00

TinyMce rework of parser.

This commit is contained in:
CaMer0n
2012-06-09 04:42:32 +00:00
parent cb9f160e38
commit 89c8da6881
6 changed files with 125 additions and 56 deletions

View File

@@ -36,18 +36,19 @@ if(e_WYSIWYG || strpos(e_SELF,"tinymce/admin_config.php") )
var id = $(this).attr('id'); // 'e-wysiwyg';
$('#'+id).after('<div><a href=\"#\" id=\"' + id + '\" class=\"e-wysiwyg-toggle\">Switch to BBCODE</a></div>');
// alert(id);
$('#bbcode-panel-'+id+'--preview').hide();
});
$('a.e-wysiwyg-toggle').toggle(function(){
var id = $(this).attr('id'); // eg. news-body
$('#bbcode-panel-'+id).show();
$('#bbcode-panel-'+id+'--preview').show();
$(this).text('Switch to WYSIWYG');
tinyMCE.execCommand('mceRemoveControl', false, id);
}, function () {
var id = $(this).attr('id');
$('#bbcode-panel-'+id).hide();
$('#bbcode-panel-'+id+'--preview').hide();
$(this).text('Switch to BBCODE');
tinyMCE.execCommand('mceAddControl', false, id);
});