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

Redactor: Remove all formatting when pasting text into the Rich Text Editor

Discussion in 'XenForo Suggestions' started by AndyB, Jun 3, 2013.

  1. AndyB

    AndyB Well-Known Member

    I would like to see an option that would would remove all formatting when pasting text into the Rich Text Editor. This would remove bold, font size, font color etc.. It would be identical to the way pasting text into the BB Code editor currently functions.

    The Remove Formatting on Paste function would be a Admin CP setting.
     
    Freelancer, ge66, Axel B and 13 others like this.
  2. CyberAP

    CyberAP Well-Known Member

    Use Ctrl+Shift+V. I believe it's cross-browser.
     
  3. AndyB

    AndyB Well-Known Member

    That's not a solution to the problem. The reason for the Remove Formatting on Paste function is to prevent members from pasting text with all sorts of formatting when they copy and paste from other websites.
     
  4. CyberAP

    CyberAP Well-Known Member

    And shortcut solves that issue. Or if you prefer you can use second click and choose 'Paste as plain text'.
    Also if you forgot to use Ctrl-Shift-V you can always use 'Remove formatting' button in the top left corner.
     
  5. AndyB

    AndyB Well-Known Member

    Hi CyberAP,

    Thank you for the suggestions, but those solutions don't solve the problem. Members will simply copy text from another website and paste into the editor, they are not expected and will not bother to remove text formatting manually. What I would like is a switch in the Admin CP that when enabled would automatically remove all formatting when text is pasted into the Rich Text Editor.
     
    Carlos likes this.
  6. Jarod

    Jarod Active Member

    +1 for me
     
    AndyB likes this.
  7. TrevC

    TrevC Well-Known Member

    Not only should this be an option within the Admin CP, trimming excess styling (colours/fonts/sizing/etc) from pasted content should be the default behaviour for XenForo's editor.

    Users don't expect these styles to be preserved, and they will almost never attempt to clean up their content using methods like CyberAP has suggested. The vast majority don't know about keyboard shortcuts or what the little "T icon with the X next to it" on the toolbar does.
     
  8. Andrej

    Andrej Well-Known Member

    It could be a option for users (like in IPB):
    Снимок экрана 2013-06-03 в 18.02.36.png
     
    Freelancer, Dylan V, Alien and 3 others like this.
  9. AlexT

    AlexT Well-Known Member

    +1 for the suggestion to paste as plain text. Right now I am using a standard text editor as a go-between for all pastes into xF forums. Cut->paste into text editor->recut in text editor->paste into xF. Not exactly userfriendly, and the only other way would be to switch to the bb code editor, which isn't all that fun either. ;)
     
    HWS and AndyB like this.
  10. TrevC

    TrevC Well-Known Member

    Even better if preserved-paste is something which needs to be explicitly enabled, since requiring preservation of all pasted styling is the edge-case scenario and not an expected behaviour. ;)
     
    AndyB likes this.
  11. Carlos

    Carlos Well-Known Member

    This is a good post. Well thought out.
     
    wickedstangs, AndyB and AlexT like this.
  12. erich37

    erich37 Well-Known Member

  13. AndyB

    AndyB Well-Known Member

    Not sure what you mean by "somehow did not work". The text gets copied but most of the formatting is not copied.
     
    Last edited: Jun 3, 2013
  14. Reeve of Shinra

    Reeve of Shinra Well-Known Member

    Bold, Italics and Underline are preserved.

    "CSS" formatting like Header and Title are not.
    Text Color, BG Color and things like GLOW are not.
     
  15. Reeve of Shinra

    Reeve of Shinra Well-Known Member

    There is a remove formatting button that seems to do this
     
  16. James

    James Well-Known Member

    Yeah, I was just about to say what @Reeve of Shinra was going to say: there's a remove formatting button (left) that removes all formatting.
     
  17. AndyB

    AndyB Well-Known Member

    Hi Reeve of Shinra,

    Thank you for your suggestion, but that solution doesn't solve the problem. Members will simply copy text from another website and paste into the editor, they are not expected and will not bother to remove text formatting manually. What I would like is a switch in the Admin CP that when enabled would automatically remove all formatting when text is pasted into the Rich Text Editor
     
    erich37 likes this.
  18. Brogan

    Brogan XenForo Moderator Staff Member

    That's not what the OP wants.

    He wants to be able to force all posts by all users to have formatting removed.
     
    Jarod, Rudy and AndyB like this.
  19. James

    James Well-Known Member

    What if someone were to paste some text into the editor and then start adding formatting, such as bold? In this instance, all of those would be removed upon save too.

    I think automatically removing all formatting isn't the most user friendly option here. It's much more difficult to add formatting that has been removed (imagine all the colours/styles to redo) than it is to remove formatting from already formatted text. Perhaps the solution here is a slight education curve to members to encourage the removal of unwanted formatting.
     
  20. erich37

    erich37 Well-Known Member

    I had a member at my Forum who just copy & pasted the text from a Word-file and he complained, saying "come back to me when your website works properly".
    Then I tried it myself and did a "copy & paste" of some text from a Word-File. I remember that I received an Error-Message (not sure which Error-message it was.... I forgot).

    But if you guys are saying that this works fine with the new Editor now, then a big issue has been solved already.

    However I agree, it should work on the fly to remove the formatting, without clicking onto any "txt-button" within the Editor.
    It is difficult to explain this to my members, they just want to "copy & paste" certain text from their .doc or .pdf File and it should work automagically.


    Another question:
    does it work fine with "copy & paste" of text from a .pdf file ? Any formatting issues there ?

    :coffee:
     

Share This Page