Did you know there are more formatting options available than what the topic/post editor presents to you? If not, you’re in the right place!


Quick Links


The Overview

Our current platform supports a whole range of different options for formatting! Currently, you can use a mix of Markdown (also sometimes just called MD), HTML, and BBCode tags for formatting.

I personally find Markdown to be my go-to, but if you’re a veteran of other forums, or a web developer, you may find BBCode or HTML to be easier to use. Either way, don’t be afraid to mix and match, and use what works best for you!

Headings

To start off with, did you notice “The Overview” and “Headings” were bigger than standard text? That’s because I’ve marked it as a heading by adding a “#” symbol at the beginning of the line like this:


# The Overview

## Headings

You can change the size of the heading by adjusting the number of #s that you add. A single # is considered a main heading (or H1) ## would be a subheading of that (H2), ### would be another layer deep (H3), etc. all the way up to… Well, let’s find out!

Heading 3

Heading 4

Heading 5
Heading 6

####### Heading 7

It looks like up to 6 levels of heading!

Headings are great for longer-form content, or when you’re separating out the steps of a How To guide. They also allow you to build out a sort-of table of contents, like my Quick Links section above, though that’s a bit more complex, and requires editing your post to get accurate links, so we’ll save it for a later post.

Code Blocks

Let’s look at formatting code blocks and inline code next, as I’ll be using those throughout this topic to show off the code behind things.

We have a few different options for marking code, and I expect the simple code block will be the most common use-case on our site. Simply start and end your code with 3 backticks (`) on their own lines like this:


```
Get-Help Get-ChildItem -Examples
Get-ChildItem -Recurse
```


and you’ll get this output:

Get-Help Get-ChildItem -Examples
Get-ChildItem -Recurse

You can also use the [code] tag that we cover next to span multiple lines for a text block, if you find yourself without a backtick key. :slight_smile:

Inline Code

There are also a few ways for you to have inline code though, which can also be handy.

  • Inline Code - wrap your text in either single backticks `code` or the [code] tag [code]Inline Code[/code]

Strikethrough, Underline, and Highlights

Bold and Italics are both on the bar at the top of the editor, but did you know you can also do other useful formatting such as strikethrough, underline, and highlighting?

  • Strikethrough - wrap your text in either BBCode’s [s] tags [s]strikethrough[/s] or HTML <Strike> tags <strike>Strikethrough</strike>

  • Underline - wrap your text in BBCode’s [u] tag

  • Mark / Highlight - wrap your text in HTML <mark> tags <mark>Mark / Highlight</mark>

Colors and Fonts!

Sometimes, you just need to add an extra bit of flair to your text, and colors or a new font might do just what you need. You can use BBCode’s [color=X] and [font=X] tags to do just that!

  • Color - [color=red]This is red text [/color]
  • Font - [font=mistral]This text might be hard to read! [/font]

Subscript & Superscript

Do you find yourself needing to specify 28 too often, or Np? “No, this isn’t a math homework forum” you say? Well, you can do subscript and superscript with the <sub> and <sup> HTML tags respectively.

  • Supercript - <sup>superscript</sup>
  • Subscript - <sub>subscript</sub>

Escaping

At this point, some of you will be wondering how I’m able to type some of these examples without the example itself triggering the formatting. That is accomplished using an “escape character”

If you’re a command line guru, or remember real terminals, you may already be familiar with escape sequences/characters. They were originally used to interact with a terminal itself, and in modern terminals can do things like change text color, spacing, font, or other aspects of the terminal/text itself. In scripting, escape characters/sequences can be used to avoid activating a function of a special character.

Here we use the escape character more like in scripting. In our case, simply putting a “\” (backslash, or as I like to call it, Windows slash) character before a symbol or sequence will “escape” it and cause it to not be interpreted.

“But how did you type that, then?” Simple, just escape the escape character with an escape character!

simply putting a "\\" (backslash, or as I like to call it, Windows slash) 

As you can see, I’ve actually had to use two \'s to get that to display correctly.

Other resources

You may also find some of the below resources handy as well!

  • We’re currently based on discourse, and discourse themselves has a handy guide to some formatting options (though this isn’t comprehensive, unfortunately) over here.
  • This page is an “allow list” of HTML elements that discourse allows. Our list might not match this 100%, but if you’re a web dev, you might find this handy
  • Discourse uses Markdown-IT for Markdown, and Markdown-IT happens to have a really good interactive demo here which covers some some advanced topics that I haven’t, such as building out tables! Though I’ll warn that not all features of Markdown-IT are available.

There’s plenty more to discover!

I’ve not comprehensively covered all of the options here, but these are some of the things I’ve found handy. Do you use any other options that I missed? Let us know below!

14 Spice ups

Today I learned… So many things! Thanks for putting this together, @Josh-J-Spiceworks!

7 Spice ups

I feel like the backslash thing is going to be a problem if people post something about UNC’s like \\%servername%\%sharename%

Having to type 6 backslash’s to display 3 is silly.

7 Spice ups

YEP. It’s already been a source of confusion on a couple of posts. If it were up to me, I’d make something much more obscure (like a zero-width space or soft hyphen) be the escape character, or have it be a specific sequence.

It does make me wonder why we don’t have more non-printing characters used regularly, though.

5 Spice ups

@Josh-J-Spiceworks Any chance of getting Powershell added to the list of highlighted languages?

6 Spice ups

I thought that it already worked, but you might need to manually specify that it’s Powershell… Let’s give it a shot.

Get-Help Get-ADUser -Online
Get-ADUser SpiceRex | Unlock-ADAccount

EDIT: Seems like maybe not… I don’t want to break production, so I’ll ping @Lois-Spiceworks on that one. :wink:

6 Spice ups

I’ve tried that, unfortunately just formats it like plain text.

6 Spice ups

@PatrickFarrell / @Josh-J-Spiceworks I’ll update the configuration on monday so that it recognises powershell.

7 Spice ups

Thanks again @Lois-Spiceworks! You rock!

7 Spice ups

I missed this when it was first posted. Looks quite handy!

HEADLINE

Smaller Headline

Even Smaller Headline

Really Small Headline

Is this still a Headline?
This is getting ridiculous!

####### OK, I’m gonna stop now!

5 Spice ups

Woohoo!

5 Spice ups