• (nodebb)

    you, our dear readers, who instead get a sometimes confounding Markdown comment box with bad editing support

    I wonder whose fault that confoundingness and bad editing support might be. Any suggestions?

  • Vera (unregistered)

    If using a monospaced font for pre tags is a bad default, what would be a better default? Just whatever font the parent tag was using?

  • (author) in reply to Steve_The_Cynic

    Bad editing, I will say, is a conscious choice. There are other design options that could have been taken, but once you post, you've posted. You can add to it, but it's part of your "permanent record".

    I'm not 100% certain why we went with Markdown in the comments (I may or may not have had something to do with it- hard to remember), but I will say I'm the one who has fought against any WYSIWYG editors- back in the ancient days, the article editor had that and I loathed it.

  • (author) in reply to Vera

    I would say so, yeah. pre is an instruction about how white space should be handled, it says "white space is significant in this section". There's no reason to have it do anything else, by default.

  • Smithers (unregistered)

    a quirk I've seen on a depressing number of other sites: make pre content be in monospace.

    As is already the default in the 3 browsers I've just tried and so probably every major browser. What's "depressing" about a site wanting to make sure on the other 1%?

    pre tells us the text is preformatted and things like extra whitespace and line breaks should be respected.

    Part of the preformatting is knowing how wide that extra whitespace is so it can be used to align things. Without a monospaced font, preserving the exact number of spaces is meaningless. The HTML standard itself even includes a poetry example that requires monospace to align a word in one line with a blank in the previous.

  • Canthros (unregistered)

    Obvious solution is to resurrect the old TT tag.

  • (nodebb) in reply to Remy Porter

    Any particular reason the markdown support is so bad? If you inspect my comment here you can see that it picked up that I used a list in markdown. As a commenter I have no clue what my comment will look like. https://thedailywtf.com/articles/comments/all-docked-up#comment-692971

  • (author) in reply to miniragnarok

    So, one of the stylesheets that got erased was the list elements. But they never got rebuilt. So no lists. If I use one in an article, I have to add an inline stylesheet. That's one I should really actually fix.

  • RLB (unregistered)
    Comment held for moderation.
  • 516052 (unregistered) in reply to Remy Porter

    Why? I am genuinely curious. Text editors with WYSIWYG are infinitely more usable than markdown. Especially markdown without so much as a set of buttons to automatically insert what you want. As evidenced by the fact that almost nobody in the comments here uses it.

    So I do have to ask why you would be against such a system.

  • (nodebb)

    "Everybody's talkin' bout the new cascading style sheets but it's still SGML to me."

    Apologies to Mr. Joel.

  • Vilx- (unregistered)

    The "semanticity" is one thing I still hate about HTML after all these years. In my (not very humble) opinion, HTML should define functionality, CSS should deal with presentation, and semantics should be added with a third, not yet existing standard, as more attributes on tags. So, in other words, we shouldn't have all the div/span/p/b/i/u/menu/head/nav/table/tr/etc tags - they should all be a single "block" tag that gets styled and semanticised as necessary. In addition to that we should have the a/input/select/button/script/style/link tags because they each add additional functionality that cannot be emulated via other tags. And I probably missed a few others.

    But the current semantic-functional tag soup is just plain wrong.

    There, I said it.

  • Vilx- (unregistered) in reply to 516052

    It would be nice if it said "Markdown supported" somewhere around here. Then more people realize that they can use it. I too prefer Markdown over WYSIWYG, because I find WYSIWYG to be as finicky as a Word document. Breathe on it the wrong way and everything collapses and you need to figure out just which pixel you need to click to put the cursor on exactly the right place to delete some invisible marker and get things back on track...

    However I also understand that some people don't care for learning the Markdown syntax, so a WYSIWYG has its place in the world too.

  • Rob (unregistered)
    Comment held for moderation.
  • (nodebb)

    This is one place where I think Gitlab excels. I still usually choose a markdown editor with a preview over WYSIWIG, but the "Rich Text Editing" mode Gitlab added a few versions back - complete with the ability to toggle back and forth - is actually pretty good.

    I'm not sure it handles Gitlab-specific references as well as I'd like (I've usually switched back to markdown mode before I would find out), and I have a tendency to forget I'm using it and try to write Markdown syntax to paste a link into and then have to go back and fix it because it tried to escape the Markdown and make the URL a link for me, but other than that it's pretty good.

    Discourse has an editor with buttons and keyboard shortcuts and a live preview that arguably works even better, but unfortunately it comes with the rest of Discourse attached to it.

    Addendum 2026-03-26 10:30: On a note concerning the actual article: I kinda see the other side of things here, but I'm mostly with Smithers. Even if it's not code, I default so heavily to the assumption that my formatting will be preserved including the width of the whitespace that...I'm that annoying guy who composes emails in Lucida Console by default.

  • 516052 (unregistered) in reply to Vilx-

    Every decent WYSIWYG editor I ever used always had the option to switch from WYSIWIG to showing all the tags and back again with a single button. I used to post on old BBCode forums over 20 years ago that had that feature. So while I understand your concern in principal this is kind of a solved problem and has been for decades now.

    Speaking of, I genuinely find BBCodes syntax to be superior to markdown. It works like HTML tags with an open and close tag which makes working with it much more pleasant AND all the common commands like bold [b], italic [i] etc. are all the same as in HTML so you don't need to learn a whole new language like you do with markdown assuming you have even a passing knowledge of HTML.

    Still, I'd settle for at least a toolbar with the basic options like bold, quote etc. that I can click to auto insert them into the text.

  • Foo AKA Fooo (unregistered) in reply to Vilx-

    It would be nice if it said "Markdown supported" somewhere around here.

    Been saying this for years. And please link to a syntax overview (for the actual markdown variant used here, whichever this may be). Unnecessary because everyone knows it? Well, I certainly don't, and I'm not gonna Google every time I want to format something, so I just don't, so I won't learn it. Vicious circle, but so easy to fix.

  • Alex Vincent (unregistered)
    Comment held for moderation.

Leave a comment on “Preformatted”

Log In or post as a guest

Replying to comment #693711:

« Return to Article