• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

simunaqv

Well-known member
#1
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
 

Brogan

XenForo moderator
Staff member
#4
No there isn't.

The TinyMCE editor is enabled by default, you have to toggle it to the BB Code editor each time.
 

Jake Bunce

XenForo moderator
Staff member
#5
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
 

simunaqv

Well-known member
#9
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.
 

Sagar

Active member
#10
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
 

Gladius

Well-known member
#15
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?
 

Gladius

Well-known member
#17
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?
 

Jake Bunce

XenForo moderator
Staff member
#18
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.
 

Gladius

Well-known member
#19
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.
 
#20
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.