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

Can I disable WYSIWYG? (Not Rich Text Editor)

Discussion in 'XenForo Questions and Support' started by Jaxel, Jan 22, 2011.

  1. Jaxel

    Jaxel Well-Known Member

    I don't like the WYSIWYG editor at all. Basically I dont like how the cut & paste mechanic works. If I cut some text from another page and paste it into the MCE, it will also paste in with the same formatting as that other page. I want to paste in without formatting. Since I don't think I'll be getting this, I would rather disable the WYSIWYG editor completely, while also retaining the helpful buttons.

    If you turn off the Rich Text Editor, its just a blank text box... no helpful buttons. I want to keep those buttons.

    Why is the cut & paste mechanic bad? Because my website has multiple skins, both light and dark. If someone is using the dark skin, and cut and pastes text from my website (which is white), it looks fine to them in the text editor; they won't even know that they also copied over the white text color tag. However, to someone who is using the light skin, the other user just pasted in white text that they can not read. The same happens vice versa.
     
    Infopro, Jarod, Sami and 2 others like this.
  2. Digital Doctor

    Digital Doctor Well-Known Member

    I've had similar problems.
    Just pasting titles from other threads gives problems like this:


    Can I disable WYSIWYG? (Not Rich Text Editor)



    way too big !!

    For me control+v = paste and windows key + v = paste without formats ! (I wrote a tiny AutoHotKey program to remove all formatting).

     
  3. Digital Doctor

    Digital Doctor Well-Known Member

    Note: you can see another problem in my post above besides the Font Size change. The Font Type changed as well.

    Would this require a TinyMCE change ?

    I wonder if there is a way to strip out JUST Font Colors ?
     
  4. Trombones13

    Trombones13 Well-Known Member

    Just tested something and it appears to work...try using CTRL+SHIFT+V to paste.
    EDIT: Only in Chrome :/

    Can I disable WYSIWYG? (Not Rich Text Editor)
     
    1 person likes this.
  5. Digital Doctor

    Digital Doctor Well-Known Member

    It works (in Chrome). Interesting.
    CTRL+SHIFT+V to paste doesn't work for Microsoft Word (where mine does). :)
     
  6. Trombones13

    Trombones13 Well-Known Member

    Yeah; my test above was in Chrome. Doesn't seem to be working in FF or IE8. :(
     
  7. Digital Doctor

    Digital Doctor Well-Known Member

    Ok this is weird.

    in IE 8, highlighting and copying a thread title, does not copy Font Size.
    so in IE8 pasting (control + v) works.
    Control+Shift+V in IE8 does nothing.

    In Chrome, highlighting and copying a thread title, does copy Font Size.
    And paste will paste the Font Size Format.
    As you mention Control+Shift+V, pastes without formatting. Nice Chrome feature.

    Note: when Copying a Thread Title in Chrome and pasting in IE8, the Font size IS pasted.
     
  8. Digital Doctor

    Digital Doctor Well-Known Member

    This helps us, but not the averate forum user.
    Jaxel's concerns are not fixed by these revelations. Although I give Chrome credit for this feature.
    Thanks for pointing it out :)
     
  9. ragtek

    ragtek Guest

    good to know!
    thx :)
     
  10. dieketzer

    dieketzer Well-Known Member

    chrome is the problem, not the solution.
    ctr+shift+v paste does work on ff4 btw

    you will find a couple threads about discussing this. this is a chrome issue, pasting colour-formatted text into tinyMCE.
    the recent move to apply the style css to the editor was an attempt to address this problem, but its not so effective if one has both a dark and a light style.
    i have been whinging about this for months.

    http://xenforo.com/community/threads/browser-bug-tinymce-paste-with-dark-style-chrome.8889/
     
  11. Brogan

    Brogan XenForo Moderator Staff Member


    Why don't you use the "Remove formatting" button?
     
  12. dieketzer

    dieketzer Well-Known Member

    the issue is that users arent always experienced enough to do so.
    there is also the dual theme problem with colour-formatted text. unlike giant font formatting and such, which is visible to all, people that use a light theme will be posting colour-formatted text (black text) completely unaware as they never witness the result of the paste themselves, only users of the dark theme do.
    if there is any confusion about how annoying this issue is, make a dark theme available on xenforo.com and experience it for yourselves.
     
  13. Mike

    Mike XenForo Developer Staff Member

    The color thing is a nightmarish WebKit issue - it actually pastes in all those styles. And as far as I can tell, you end up not being able to tell the difference between an explicit color and what WebKit decided to paste. (And TinyMCE's paste plugin just makes everything worse, argh!)
     
  14. dieketzer

    dieketzer Well-Known Member

    i would be happy if all colour functionality was stripped from the editor. im not sure if that is achievable, but it looks to me to be the only certain fix to the most annoying aspect of the issue, colour-formatted text.
     
  15. Brogan

    Brogan XenForo Moderator Staff Member

    What about those who want to use colour formatting?
     
  16. Mike

    Mike XenForo Developer Staff Member

    If you remove this line from library/XenForo/Html/Renderer/BbCode.php, it will likely make all color settings (via the WYSIWYG editor) go away:
    Code:
    'color'           => array('$this', 'handleCssColor'),
    Any intentional changes will be lost as well though.
     
    Digital Doctor and dieketzer like this.
  17. dieketzer

    dieketzer Well-Known Member

    the needs of the many outweigh the wants of the few.

    thanks for that! i will try it now and report back.
     
  18. Brogan

    Brogan XenForo Moderator Staff Member

    I think you've got it the wrong way around.
    I've only seen a few people complaining about colour formatted text.

    Removing basic functionality isn't really a solution.
     
  19. dieketzer

    dieketzer Well-Known Member

    it is the only solution if half your users use a dark theme.
     
  20. dieketzer

    dieketzer Well-Known Member

    so i commented out the line mike referred to and the results are all good:
    • pasted colour-formatting will be visible in the editor, yet will be stripped when posted.
    • php code colour-formatting is unaffected.
    • the effect is not retroactive.
    • the editor colour button will need to be manually removed
    this is perfect.
     
    Digital Doctor likes this.

Share This Page