• The site has now migrated to Xenforo 2. If you see any issues with the forum operation, please post them in the feedback thread.
  • 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.
  • 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.
  • 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.
  • Due to the actions of particularly persistent spammers and trolls, we will be banning disposable email addresses from today onward.
  • The rules regarding NSFW links have been updated. See here for details.

Editor issues

Kinematics

Well worn.
Joined
May 14, 2015
Messages
7,089
Likes received
19,705
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:
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...)
 
Still, you can avert most of the formatting disasters by using Ctrl+V instead of the mouse interface.
It gets worse? I've never used anything but Ctrl+V for pasting.

At least if "paste as plain text" was disabled by default...
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.
 
Oddly, if you copy and paste from a word processor, it doubles the returns between paragraphs.
 
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.
 
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.
 

Users who are viewing this thread

Back
Top