Previously I could use three backticks before and after a body of text to mark it as preformatted. It would retain the line breaks. This is how stuff works in general markdown, which I thought worked here on discourse. Or, I could select the text and click the “preformatted text” button and that would do the same—line breaks would be retained.Now, line breaks seem to be removed so a multi-line preformatted text become one very long line.
If I write three backticks and then paste multi-line text, it seems to be fine. But if I select multiline text and click the preformatted text button, the line breaks seem to be removed.
Any one else seeing this?
I was trying to preformat the text in this post for example.
It should remember, yeah. There is a global setting for the default — we could have it either be Markdown or “Rich text”. If we change that, it won’t affect existing users by default.
For people who don’t know what Markdown is, the WYSIWYG editor is probably the better choice. And for the users that prefer Markdown (myself included) the setting is remembered.
Is the rich text interface easier? It looks like it has the same UI buttons on the top bar, but it just doesn’t accept the Markdown syntax in the editing window. For the WYSIWYG, the Markdown editor does have that, it is just shown in the preview window to the side. I only see losses, no gains with the rich text editor.
But the Markdown does have a “what you get” preview, so I don’t see the improvement with the rich text editor. I’m not a new user, but I don’t want to shove a limited interface on this class of “new users” under the assumption that they cannot comprehend that the “WYG” is displayed in the window to the side as they type.
Edit: OK, I guess it is true that clever people will (eventually) discover the toggle switch to enable Markdown, so I’ll give on that point. I wonder though which way is really annoying the greater number of people.
The “Rich Text” mode is IMO closer to what people may know from e-mail clients, word processors, or something like Teams or Slack. And those who find this mode lacking and/or know and prefer Markdown can switch with a single click, permanently.
I tried the mobile version. No chance to use it anymore. It was already before quite difficult to work with … now it just fills the screen with a white square that I cant type anything.
Edit: The white square is caused by uBlock Origin. When I switch this off I can edit again.
However the preformatted text as is will make us trouble. I can imagine that code past in “rich text” which looks strange cant be changed to something we are used of.
I found something out, if you click in the Rich Text Editor on Preformatted Text (PFT), you will get a black block which lets you past the code as in the Html editor.
If you past and mark the block and then click on PFT you get single line code blocks as if you just mark on the same line and then it has different color.
It probably would be a good idea to make an announcement how to proceed to get the same outcome as we had.
Problem are the new users, which not are new to PFT and do not know how it should look like.
@mattdm did we not change the basic theme for html editor so, that when you marked more than one line it will create the black block with the scrollbars when clicking on the PFT button.
You can toggle back and forth between the Markdown and Rich Text editor to see what is happening:
In the Rich Text editor, click “Preformatted Text” without a selection. You get a grey block and can paste text. When you switch to Markdown, you see that it inserted a code block, delimited by three backticks (```) at the start and end. (Sidenote, because backticks are dead keys on my keymap, I have trained myself to use ~~~ instead, maybe someone finds this tip useful.)
In the Rich Text editor, select a single word or several words on a single line and click “Preformatted Text”. The words are now surrounded by a grey block inline. And in the Markdown editor, you can see that it got converted to an inline code block, with a single ` at the beginning and end.
In the Rich Text editor, select text that spans multiple lines and click “Preformatted Text”. Now each line is surrounded with a grey block, notice the horizontal breaks between blocks and the ragged right edge (for LTR languages). In the Markdown editor, it is converted to a sequence of lines, each with an individual inline code block. In other words, you get
Yeh, this is the bit that was confusing me. It should just end up as a single block of multi-line text instead of either a single line or this weird every line as a code element thing.