Blocks

Blocks »Code Block

With the code block you can add formatted code for others to view.

Add the code block from the Block Inserter icon or the slash command /code.
Add the code block from the Block Inserter icon or the slash command /code.
Adding content to the code block will wrap the content in  tags.
Adding content to the code block will wrap the content in tags.

In order to add a code block, click on the Block Inserter icon.

You can also type /code and hit enter in a new paragraph block to add one quickly.

Use the slash command /code to insert a code block.
Use the slash command /code to insert a code block.

Detailed instructions on adding blocks can be found here.

Block Toolbar

Each block has its own block-specific controls that allow you to manipulate the block right in the editor. The Code block has some tools in the block toolbar that you can use to change the formatting of your text.

Block toolbar for the Code block.

In addition to adding links, making text Bold or Italic, you can also do various other formattings within the Code block by clicking the down-arrow and choosing the desired option.

↑ Table of Contents ↑

Block Interface

Each block has its own block-specific controls that allow you to manipulate the block right in the editor. The code block only offers the block settings icon in the block toolbar. Optionally, you can transform the code block into a preformatted block.

The code block only offers the block settings icon in the block toolbar.
The code block only offers the block settings icon in the block toolbar.

↑ Table of Contents ↑

Most blocks have specific options in the editor sidebar in addition to the options found in the block toolbar. If you do not see the sidebar, simply click the 'cog' icon next to the Publish button.

The code block only offers Additional CSS Classes in the sidebar.
The code block only offers Additional CSS Classes in the sidebar.

Advanced

The advanced tab lets you add a CSS class to your block, allowing you to write custom CSS and style the block. Learn more.

The advanced section lets you add a CSS class to your block.
The advanced section lets you add a CSS class to your block.

Not quite what you're looking for?

Get Help