choose editor in forum and quick reply#3318
Conversation
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)
| return false; | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Thanks for this PR. I'm not a fan of this code here though. Using e107::wysiwyg(false); in the forum plugin should be enough to disable it.
There was a problem hiding this comment.
That doesn't work. I tried it already. Look at the bbarea() function, where wysiwyg() is called and you see that any previous change will be overwritten.
Changing the wysiwyg(true) in bbarea to wysiwyg() is also a bad idea, because wysiwyg() is saving the last setting in the registry, which means that the bbarea will not be replaced by tinymce system wide when wysiwyg(false) is called anywhere in the code.
As a systemwide change is not what I want to achieve, I had to add some code that checks for the current plugin and to return a value without touching the global settings in the registry.
| 'editor' => array('title' => 'Post editor', 'type' => 'dropdown', 'data' => 'str', 'readParms' => array(), 'writeParms' => array('optArray' => array(), 'defaultValue' => 'default'), 'help' => 'Which editor should be used to create/edit posts?'), | ||
| 'quickreply' => array('title' => 'Quick replay editor', 'type' => 'dropdown', 'data' => 'str', 'readParms' => array(), 'writeParms' => array('optArray' => array(), 'defaultValue' => 'default'), 'help' => '') | ||
| ); | ||
|
|
There was a problem hiding this comment.
I don't think there should be a pref for 'quick reply' . The whole idea behind quick-reply was that there is no formatting. (that's what makes it quick). When formatting is required, then people should use the 'reply' button. I'm guessing removing this will also remove the need to change line 405 of the template.
There was a problem hiding this comment.
I personally always modded the v1 forum to have bbcode in the quick reply field... And I could imagine, I was not alone. With this setting, the admin can decide if he/she wants a simple textarea or the chosen editor. Default is the textarea.
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)