1. 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?

Discussion in 'XenForo Questions and Support' started by simunaqv, Oct 7, 2010.

  1. simunaqv

    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
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Click on the [​IMG] in the top right hand corner of the text editor.
     
  3. simunaqv

    simunaqv Well-Known Member

    Thanks a lot.
    Is there any relevant setting in the user control panel?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    No there isn't.

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

    Jake Bunce XenForo Moderator Staff Member

    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
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Nice one Jake.

    Presumably the link to switch back to the rich text editor still works?
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Nope. :(
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Ah.
    In that case I won't try that then :D
     
  9. simunaqv

    simunaqv Well-Known Member

    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.
     
  10. Sagar

    Sagar Active Member

    Thanks, this is what I was looking for. Will BB code still work?
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes. You can still use BB code in the plain text editor.
     
  12. Dean

    Dean Well-Known Member

    But no buttons, correct?
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Correct. No shortcut buttons. You will have to manually type the BB codes.
     
  14. Digital Doctor

    Digital Doctor Well-Known Member

    Jarod likes this.
  15. Gladius

    Gladius Well-Known Member

    editor_quick_reply not around any more?
     
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's called quick_reply now. But the editor type is now a user preference, so your users can just select the editor they want to use, rich or plain.
     
  17. Gladius

    Gladius Well-Known Member

    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?
     
  18. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
    Joe. likes this.
  19. Gladius

    Gladius Well-Known Member

    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. MrNorwood

    MrNorwood New Member

    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.
     

Share This Page