[Updated 2023-02-10] Migration complete

Yeah, i now know its means bookmark since i read @ToyKeeper 's post but others would not.

That said the new red bookmark and bolding does pop out well.

I still think it should ideally say [Bookmarked post in thread] to remove ambiguity.

I don’t recommend standing for bowel movement.

A flaming BM removes more than ambiguity!

3 Thanks

:+1:

Fire also gives off lumens. Double win! :smiley:
:fire:

You know being BLF we could get even more creative, perhaps a flashlight logo could be used to represent bookmarks

1 Thank

It’s probably been mentioned several times but the post editor is really sparse. No tool button for strikethrough, underline text, font size, font color, etc.

is two tildes front and back
aaaa bbbb cccc
It is markdown it is worth learning it more and more editors use it.

Yea, definitely not as convenient as the old forum’s editor(s).

I need to reformat some Old-Lumens contest related threads a bit. There’s some HTML in my future, it would seem.

Yeah, it’s definitely worth learning the basics of HTML and/or Markdown, since they’re so widely used and the most important parts are pretty easy.

With HTML, formatting is done with tags, which is just a word inside of <>'s. One tag to begin a formatted area, one tag to end it, and the end has an extra slash inside.

Markdown is just a subset of HTML, with more convenient syntax which looks more natural when read raw without being interpreted or rendered.

Here are some of the things they can do…

ExampleHTMLMarkdown
bold text <b>bold text</b> **bold**
italic text <i>italic text</i> *italic*
strike-through <strike>strike-through</strike> ~~strike-through~~
nested <strike><b><i>nested</i></b></strike> ~~***nested***~~
code span <code>code span</code> `code span`

Top-Level Heading

<h1>Top-Level Heading</h1> # Top-Level Heading
6th-Level Heading
<h6>6th-Level Heading</h6> ###### 6th-Level Heading
Link <a href="http://example.com/">Link</a> [Link](http://example.com)
pepper icon <img alt="pepper icon" src="http://toykeeper.net/torches/other/pepper-icon.png" /> ![pepper icon](http://toykeeper.net/torches/other/pepper-icon.png)
big text <big>big text</big> [not in Discourse]
small text <small>small text</small> [not in Discourse]
basesuperscriptsubscript base<sup>superscript</sup><sub>subscript</sub> [not in Discourse]

<hr /> ---
quote
<blockquote>quote</blockquote> > quote
  • a
  • b
  • c
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
- a
- b
- c
  1. a
  2. b
  3. c
<ol>
<li>a</li>
<li>b</li>
<li>c</li>
</ol>
1. a
1. b
1. c
abc
123
<table>
<thead>
<tr><th>a</th><th>b</th><th>c</th></tr>
</thead>
<tbody>
<tr><td>1</td><td>2</td><td>3</td></tr>
</tbody>
</table>
| a | b | c |
| - | - | - |
| 1 | 2 | 3 |

As a general rule, HTML can do more but Markdown is easier to type. HTML is the native language being used, while Markdown is basically “syntactic sugar” to make HTML features a bit more convenient.

As for changing the color, I don’t think Discourse allows that without add-ons. Probably because setting colors manually usually means half the users will have a harder time reading it, like how dark-mode users complained when sb set a background color for bookmarked topics.

5 Thanks

Thanks a lot for that table @ToyKeeper .

Speaking of tables, Discourse does support them in Markdown (technically “Github Flavored Markdown [GFM]”):

| Left-aligned | Center-aligned | Right-aligned |
| :--- | :---: | ---: |
| left aligned | center | right |
| left aligned | center | right |

… produces:

Left-aligned Center-aligned Right-aligned
left center right
left center right

I do have some other options to make the post editor expose more Markdown formatting stuff. I just need to make sure that the chosen option is fairly future-proof, and I haven’t had time to fully research and test it yet.

3 Thanks

My apologies if this created extra work for you. Could you please send me a link of the threads that need reformatting? I tested and refined the formatting conversion code many times over several months to try to get it right, and I even reported quite a few bugs that the developer fixed in a third-party text format conversion tool that was plugged into the importer. But I’m sure there are a few quirks and edge-cases here and there.

Thanks ToyKeeper for the HTML and Markdown tips, as I was not familiar with those.

The Discourse Forum Engine seems to compress white space so that there is never more than “one blank line” no matter how many “carriage returns” I type.

I sometimes prefer “two or more blank lines” instead of “one blank line” between unrelated sections of my posts for clarity and discovered that inserting the four characters “<br>” will insert blank lines that do not get compressed out.

Note: In the above sentence, I had to precede the “<br>” characters with a “\” character so that it displayed as “<br>” instead of inserting a blank line.

1 Thank

Hi @roostre , that’s correct. You can use:
</br>








Another option is a backtick with a space followed by another backtick, all on its own line:

` `






Seems to work.

1 Thank

The threads look fine but when I go to edit them a lot of html code is revealed, to the point where it looks like page source code, and I think most of it is unnecessary, so my plan is to remove most of the html code and use markdown as needed.

The Old-Lumens contest archive has a lot of code to refine but the 10th annual O-L challenge thread only has a little. The 10th annual challenge thread may be used as a template for future contests, so I want it to be perfectly formatted.

Also, I tried a few things but could not get the countdown timer to display in the challenge thread.

Thanks! I tried a few variations and nothing produced a table, so I figured that part of Markdown wasn’t included in Discourse. But it looks like it was just ignoring Markdown there because it was inside of some HTML tags. It seems to adjust syntax locally based on contextual clues.

For example, the interpretation changes depending on whether something is inside a HTML blockquote vs being inside a Markdown blockquote:

Markdown inside HTML:

*hi there*

Markdown inside Markdown:

hi there

HTML inside HTML:

hi there

HTML inside Markdown:

hi there

So if something isn’t working, check to make sure it’s not inside of some HTML tags, because HTML turns off the Markdown parser.

1 Thank

Thanks for your time tweaking those. I think this will help you to convert the HTML into Markdown:
https://pandoc.org/try/
Paste in the HTML, set the from language to “html”, and the to language to “gfm”, and click Convert.

If there are sections that don’t convert correctly with the above tool it’s probably because my conversion script intentionally removed some of the HTML tags to make those parts display better in Discourse by default (without manual editing). Basically when the HTML tags are removed it will render those parts of the post such as images and videos using the Discourse engine’s automatic embedding method. So what you could do there is select the entire post in normal view mode (not clicking the Edit button) and use your browser’s “View selection source” option, and paste that into the Pandoc converter as described above.

1 Thank

Yep, that’s the reason. It doesn’t do mixed mode rendering, if it finds HTML then everything inside those tags will be treated as HTML with no additional rendering filters applied. For example, in the old forum <p>http://example.com</p> would still get linkified because an additional filter ran after the HTML was processed, but Discourse doesn’t.

It’s just a big pile of garbage really.

@ToyKeeper Actually I was thinking that Discourse had a table builder button in the post editor by default, so thanks for bringing that to my attention, I need to add that for sure.

It honestly looks quite good to me. The major difference now compared to the original rendering is that it shows the overview images directly instead of just an HTML link to the image for that year. Actually no, the original version also showed the overview images directly. It could probably benefit from some proper ## Headings but that would be easy to add.

Unfortunately, that’s going to happen if you used the advanced post editor on the old forum and now want to edit those old posts on the new forum. That pretty much throws you right into the deep end. :frowning:

Also unfortunately, the advanced editor didn’t attempt to output human-friendly HTML, so it tends to come out as a big wall of text. That can be improved by pasting it into pretty much any code editor and having it auto-format the markup. Some automatic search-and-replace can help too, to remove attributes the new system doesn’t allow.

I use a command-line code “beautifier” called pup for this, but I’m pretty sure that’s not what you’re looking for. An online tool like sb linked is probably a much better choice. Just make sure to back up the original post into a file first, before you start processing it.

Markdown would be easier, but there’s no foolproof way to convert the advanced editor’s data into Markdown… because the old editor allowed a bunch of things which simply aren’t possible in Markdown. So either you’ll have to edit it as HTML, or do a lossy conversion.

Yeah, that’s probably not going to work in the new forum. It explicitly forbids cross-site scripts and other advanced trickery which worked on the old forum. Drupal allowed almost any HTML with no restrictions, but Discourse only allows a pretty limited subset of the full language. So, no mouse-overs, no javascript widgets, no embedded stylesheets, etc.

Any time you see a style="foo" or data-darkreader-inline-color="bar" or anything like that inside a HTML tag, Discourse is going to pretend it’s not there. May as well strip all those out with search-and-replace.

Anyway, it’s no fun getting tossed into the deep end… straight from a GUI to a wall of code. I’d love to tell you there’s an easy solution, but I don’t think there is.

1 Thank