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
 
Click on the
switchmode.png
in the top right hand corner of the text editor.
 
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
 
Brogan and Jake, thank you for providing this information. Actually I need the text editor mode since I use a jQuery plugin to turn it into an Urdu editor for use in Urdu forums.
 
Thanks, this is what I was looking for. Will BB code still work?
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
 
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

editor_quick_reply not around any more?
 
I know but I want to disable the blasted rte by default and just force plain text for everyone unless they choose otherwise... is that doable in some way?
 
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.
 
Thanks - given how many complaints there are about the editor I really don't know why this is still not included. :/ Mass updating is no good if all the new users don't get the same setting.
 
I still would also really like to see this simple "off/on" option implemented. The text editor is one place where users (even well-intentioned ones) can really screw up the look of a board and by extension, a company's brand, particularly with messing pages showing up. That is, *not* allowing the option to use the rich text editor at least gives admins some predictability to the look of the pages.
 
Top Bottom