1. Due to issues with external spam filters, QQ is currently unable to send any mail to Microsoft E-mail addresses. This includes any account at live.com, hotmail.com or msn.com. Signing up to the forum with one of these addresses will result in your verification E-mail never arriving. For best results, please use a different E-mail provider for your QQ address.
    Dismiss Notice
  2. For prospective new members, a word of warning: don't use common names like Dennis, Simon, or Kenny if you decide to create an account. Spammers have used them all before you and gotten those names flagged in the anti-spam databases. Your account registration will be rejected because of it.
    Dismiss Notice
  3. Since it has happened MULTIPLE times now, I want to be very clear about this. You do not get to abandon an account and create a new one. You do not get to pass an account to someone else and create a new one. If you do so anyway, you will be banned for creating sockpuppets.
    Dismiss Notice
  4. If you wish to change your username, please ask via conversation to tehelgee instead of asking via my profile. I'd like to not clutter it up with such requests.
    Dismiss Notice
  5. Due to the actions of particularly persistent spammers and trolls, we will be banning disposable email addresses from today onward.
    Dismiss Notice
  6. A note about the current Ukraine situation: Discussion of it is still prohibited as per Rule 8
    Dismiss Notice
  7. The rules regarding NSFW links have been updated. See here for details.
    Dismiss Notice
  8. The testbed for the QQ XF2 transition is now publicly available. Please see more information here.
    Dismiss Notice

Editor issues

Discussion in 'Suggestions & Bugs' started by Kinematics, May 27, 2015.

  1. Kinematics

    Kinematics Well worn.

    Joined:
    May 14, 2015
    Messages:
    6,909
    Likes Received:
    19,199
    The editor on the forums seems to have a number of automatic actions that harm the integrity of posts being made. I know that these issues are not present on SV and SB, and since all three forums are XenForo-based, this should be fixable.

    1) Pasting text into the rich editor (but not the BB Code version of the editor) will strip out all blank lines. That means blank lines inserted between paragraphs for readability are removed, making all of the text collapse together. It also strips out extra spaces, including spaces that should have gone into a preformatted text block (text enclosed in [code] tags), mangling the original attempt at formatting.

    2) Preformatted text (text enclosed in [code] tags) converts continuous runs of spaces into tabs. This wouldn't be quite as bad if the default tab width on display wasn't different from the number of spaces that were converted to tabs. It seems to convert every group of 4 spaces into a tab, but then display text with a tab width of 8 spaces (browser default). Either it should not be converting spaces to tabs in the first place, or the CSS should include info on the actual tab size of 4 rather than 8 (-moz-tab-size, -o-tab-size, tab-size; IE does not support this), or it should be converting groups of 8 spaces at a time to match browser defaults of an 8-space tab.

    Note that the above mangling is done even when editing using the BBCode editor rather than the rich text editor.

    3) The editor appears to strip other characters out, such as the zero-width space.

    This line:
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

    Should have a zero-width space between the a's and the b's, causing the two segments to each appear on their own line (as long as the window is narrow enough to force a word wrap). It behaves that way in the editor, but strips the character out of the preview and post.


    Certain parts of this problem are the editor itself, as it behaves while running in the browser, and certain parts are due to modifications it makes on the back end, after posting. There are too many modifications being made to the post by the forum.
     
    Last edited: May 29, 2015
    Bre Karn likes this.
  2. Bre Karn

    Bre Karn (Very Slow) Writer of Glorious Smut

    Joined:
    Aug 22, 2013
    Messages:
    10,232
    Likes Received:
    16,685
    Ah yes; the source of much frustration.

    At least if "paste as plain text" was disabled by default...

    Still, you can avert most of the formatting disasters by using Ctrl+V instead of the mouse interface.

    Also other problem, when I'm using my iPad sometimes the RT editor's buttons will be changed to random images (ponies, rainbows, etc...)
     
  3. Kinematics

    Kinematics Well worn.

    Joined:
    May 14, 2015
    Messages:
    6,909
    Likes Received:
    19,199
    It gets worse? I've never used anything but Ctrl+V for pasting.

    Ahhh. Interesting. I hadn't noticed that toggle before.

    Yes, turning it off allows pasted text to not be stripped of blank lines. Nice. I'm not sure how it affects the other issues.

    Code:
    0		   1		   2
    1		   1		   2
    2		   1		   2
    
    OK, it doesn't strip the spaces out when pasting, but it still converts runs of spaces to tabs.
     
  4. GiftofLove

    GiftofLove A Gift From The Heart

    Joined:
    Jun 16, 2014
    Messages:
    11,332
    Likes Received:
    59,160
    Oddly, if you copy and paste from a word processor, it doubles the returns between paragraphs.
     
  5. Kinematics

    Kinematics Well worn.

    Joined:
    May 14, 2015
    Messages:
    6,909
    Likes Received:
    19,199
    Very strange. If I copy the same text from Word (three lines with blank lines in between), pasting into this editor preserves the blank lines regardless of the Paste As Text setting. However if I paste them into a text editor and then copy from there, pasting them into this editor strips the blank lines when Paste As Text is on, but keeps them when it's off.

    Looking at the raw clipboard contents, it seems to be identical in each case: a newline (\n) at the end of each line (both sentences and blank lines). Changing \n to \r\n (DOS format newlines) does not change anything; pasting with Paste As Text on still strips the newlines if they came from the text editor. Changing from ANSI to Unicode source doesn't change anything. Pasting with two blank lines between paragraphs removes only one of them, however, leaving the desired one blank line between paragraphs.

    Digging in further, the paste module for the page seems to have a bunch of code for handling stripping out MS Office stuff from a text/html formatted paste, which is one of the clipboard elements created when copying from MS Word. A text editor of course doesn't have that, and only creates CF_TEXT and CF_UNICODETEXT objects on the clipboard.

    Searching for the plugin, it looks like it's the TinyMCE Paste plugin (part of TinyMCE Enhancements, which is no longer supported, and TinyMCE Quattro). I would guess that we want it to default to Paste As Text, rather than trying to parse MS Word markup. I also suspect it would be easy to fix for the person who wrote the code; I just don't want to dig any deeper into minimized javascript.

    It may also be subject to variances between browsers. I'm using Firefox.
     
    GiftofLove likes this.
  6. alethiophile

    alethiophile Shadowed Philosopher Administrator

    Joined:
    Apr 26, 2013
    Messages:
    7,610
    Likes Received:
    53,664
    I am entirely on board with the principle of keeping the forum from altering posts in unpredictable or invisible ways. Unfortunately, the WYSIWYG editor is a black box and the Xenforo backend is even more of a black box. I can look into it, but I anticipate finding that the only available option would be to rewrite one or both of them, the which I do not have the free time or the inclination to do.

    I will note that HTML copy-and-paste is a bizarre abomination, and for best reliability you should write or generate plain BBcode and paste into the plain-text version. There's tools that will convert Markdown to BBcode, if you look; this is what I do.
     
    Valette-Serafina likes this.