mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
choose wysiwyg editor
Now it is possible to have TinyMCE in the backend and SimpleMDE on the forum pages. wysiwyg() got a new parameter $returnEditor to return the name of the editor. wysiwyg() now checks if the choosen editor is installed. wysiwyg() setting a value is not systemwide anymore (static var instead of registry) Use the bbarea() $options array to define the editor to use e.g. $options['wysiwyg'] = 'tinymce4'; Updated forum_admin.php to support SimpleMDE. Updated tinymce4/e_footer.php to support the new return value (editor name)
This commit is contained in:
@@ -179,7 +179,8 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
$editor = $this->forum->prefs->get('editor');
|
||||
|
||||
$wysiwyg = ($editor === 'bbcode') ? false : null;
|
||||
//$wysiwyg = ($editor === 'bbcode') ? false : null;
|
||||
$wysiwyg = is_null($editor) ? 'default' : $editor;
|
||||
|
||||
return e107::getForm()->bbarea('post',$text,'forum','_common','large', array('wysiwyg' => $wysiwyg));
|
||||
|
||||
|
@@ -1214,10 +1214,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$editor = $this->forum->prefs->get('editor');
|
||||
$editor = is_null($editor) ? 'default' : $editor;
|
||||
$text = "
|
||||
<form action='" . $url . "' method='post'>
|
||||
<div class='form-group'>" .
|
||||
e107::getForm()->bbarea('post','','forum', '_common', 'small', array('id' => 'forum-quickreply-text')) .
|
||||
e107::getForm()->bbarea('post','','forum', '_common', 'small', array('id' => 'forum-quickreply-text', 'wysiwyg' => $editor)) .
|
||||
"</div>
|
||||
<div class='center text-center form-group'>
|
||||
<input type='submit' data-token='" . e_TOKEN . "' data-forum-insert='" . $ajaxInsert . "' data-forum-post='" . $this->var['thread_forum_id'] . "' data-forum-thread='" . $this->var['thread_id'] . "' data-forum-action='quickreply' name='reply' value='" . LAN_FORUM_2006 . "' class='btn btn-success button' />
|
||||
|
Reference in New Issue
Block a user