Code blocks are a powerful formatting tool for tech-savvy teams who want to document and collaborate on code. With Slab, you can easily embed code with syntax highlighting and even see the rendered result right in the post.
Creating a code block
The fastest way to create a code block is through our shortcuts. Simply type ```
on a new line and press Enter
. To specify the language for the code block from the get-go: use ```[language]
, such as ```js
.
You can also create a code block using our formatting menu:
Type "/code block" on a new line and press Enter.
Hover over the code block and click the dropdown menu.
Select your programming language.