Is it possible to use a textarea (non-wysiwyg) editor?

simunaqv

Well-known member
Hello,
I want to know if it is possible to use a simple textarea based editor interface for editing messages in xenForo? I am not able to find any such option in my user settings.
Best regards,
Nabeel
 
You can mass update the editor preference of all existing users by running this query:

Code:
UPDATE xf_user_option
SET enable_rte = 0;

You can set the default prefs for new users here:

Admin CP -> Home -> Options -> User Registration -> Default Registration Values

But there is no option there for the editor.

Any updates on this?

I'd like to have it turned off by default for new registrations too.
 
I'd like to have it turned off by default for new registrations too.
RTE editor disabled by default:
Code:
ALTER TABLE xf_user_option CHANGE enable_rte enable_rte TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
RTE editor enabled by default:
Code:
ALTER TABLE xf_user_option CHANGE enable_rte enable_rte TINYINT(3) UNSIGNED NOT NULL DEFAULT '1';
Next time, just use Phpmyadmin to check and change the table properties.
 
RTE editor disabled by default:
Code:
ALTER TABLE xf_user_option CHANGE enable_rte enable_rte TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
RTE editor enabled by default:
Code:
ALTER TABLE xf_user_option CHANGE enable_rte enable_rte TINYINT(3) UNSIGNED NOT NULL DEFAULT '1';
Next time, just use Phpmyadmin to check and change the table properties.

Ran the query, registered a brand new account to test and RTE was still enabled by default.
 
Ran the query, registered a brand new account to test and RTE was still enabled by default.
You will probably have to change the datawriter default value as well.
Class: XenForo_DataWriter_User
Search:
Code:
        'enable_rte'
           => array('type' => self::TYPE_BOOLEAN, 'default' => 1),

Replace:
Code:
        'enable_rte'
           => array('type' => self::TYPE_BOOLEAN, 'default' => 0),
 
You can also edit the templates to permanently enable the plain text editor:

Admin CP -> Appearance -> Templates -> editor_quick_reply

Add " AND false" to the WYSIWYG conditions as shown below:

Code:
<xen:if is="{$showWysiwyg} AND false">
    <textarea name="{$formCtrlNameHtml}" id="{$editorId}_html" style="display:none" class="textCtrl MessageEditor">{$messageHtml}</textarea>
    <noscript><textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor">{$message}</textarea></noscript>
<xen:else />
    <textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor">{$message}</textarea>
</xen:if>
<input type="hidden" name="_xfRelativeResolver" value="{$requestPaths.fullUri}" />

<xen:if is="{$showWysiwyg} AND false">
    <xen:include template="editor_js_setup" />
</xen:if>

<xen:comment><xen:require css="editor_contents.css" /></xen:comment>

You can do the same thing to this template:

Admin CP -> Appearance -> Templates -> editor

Should this way for 1.4? Are there any easier way to let all users prefer not to "Use the rich text editor to create and edit messages" ?
 
Top Bottom