It seems to be fairly common for new forum users to be unable to find advice on formatting markup.
The result is that those of us who have been around for a while have to explain, repeatedly, how to format code examples. (And, in some cases, it might take two or three times to explain it within one thread.)
So I went looking for a help page / tutorial on formatting, and… there seems not to be one.
Is this something that could be added? Like a big button in the post editor toolbar (top right, visually separate from the formatting tools)?
At least when starting a new topic in the Questions category, and maybe in other scenarios, the post preview to the right of where you type your message shows all the instructions as a window that can be closed out of to actually see the preview.
It’s not here now as I write this, not sure that’s the case for every response in every sub-forum, and once you close out of it I don’t see a way to reopen in. And of course if one presses the << hide preview button on the bottom right it may never show up at all.
But perhaps if those instructions would appear with every post / can be set as a preference the user preferences - default - so that can also be turned off to not get irritating after learning them, and have a link somewhere in the posting pop up, either in the text formatting bar, or above, to make them show up again after closing them, that might work? And it’s almost there already…
Another thought is: when posting, again at least in questions, the forum is searching for and recommending possible topics that exist that may answer one’s question, so perhaps if it was also coded to pay attention to what looks like code and pop up a reminder with instructions for proper formatting. Not sure how hard that would be, and whether discourse automatically had that questions search built in, or if that was custom made.
I’ve searched for a plugin that does this (e.g. detect code and warn users to quote it), but haven’t found anything. If anyone can find a discourse plugin, I would be ecstatic to install it - it beats having to feel like a jerky pedant, asking people over and over again to ``` their code.
And hmm, this isn’t anything specifically useful it converts text to some other text, but the code seems very straight forward, so maybe can be used to build a custom auto-formatter: Overwatch Hero Icons - plugin - Discourse Meta
This requires the start of a BBcode at least, but can function for recommending autocomplete: GitHub - rux-pizza/discourse-awesome-bbcodes. Probably not too helpful, as it seems like it may get annoying, requires someone to already begin the formatting process, and doesn’t necessarily work with backticks.