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

choose editor in forum and quick reply

New prefs for forum: editor & quickreply
editor makes it possible to choose between bbcode or tinymce (if installed and html enabled)
quickreply gives the option to choose between the standard textarea or the choosen editor (from pref editor)
This commit is contained in:
Achim Ennenbach
2018-07-25 22:48:14 +02:00
parent 526bc06ba0
commit 26022e4507
6 changed files with 96 additions and 17 deletions

View File

@@ -27,7 +27,14 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
var action = $this.attr('data-forum-action');
var thread = $this.attr('data-forum-thread');
var post = $this.attr('data-forum-post');
var text = $('#forum-quickreply-text').val();
if (typeof tinymce == 'undefined')
{
var text = $('#forum-quickreply-text').val();
}
else
{
var text = tinymce.get('forum-quickreply-text').getContent();
}
var insert = $this.attr('data-forum-insert');
var token = $this.attr('data-token');
var script = $this.attr("src");
@@ -109,7 +116,14 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
e107.attachBehaviors();
}
$('#forum-quickreply-text').val('');
if (typeof tinymce == 'undefined')
{
$('#forum-quickreply-text').val('');
}
else
{
tinymce.get('forum-quickreply-text').setContent('');
}
return;
}