How to Format Code

PiperWilson
PiperWilson HLV Staff Alumni
edited May 31 in Talk Community #1

In the 2024.006 release, the Rich 2 Editor was enabled by default for new sites. W00T!

There are several ways to format posts. I’ll focus on formatting code blocks.

This is what a code block looks like when you’re ready to enter your text. You can use it to change the appearance of your text when you want to highlight something special or enter code. When you use a code block, the code you enter will be formatted properly without having to fiddle around with things.   

Options for Code Blocks

Rich 2 Editor:

Select the paragraph symbol next to the text entry box of the comment or discussion you’re about to create. Then, click on the quotation mark symbol. That will open a drop-down menu where you can click on the “</> Code Bock” and then enter your text.

Advanced Editor:

The code drop-down menu looks like this:

Highlight Text:

You can enter text regularly and then highlight the text you want to appear as code. A drop-down menu will appear. Select {..}, and your text will “translate” it into a code block.

Markdown-Based Macro:

In the comment or discussion box, type a backtick followed by your text and then another backtick. The text will be formatted as code.

References: