Code blocks

Display code in your documentation.

A code block can be created to display a code snippet.

This is what a code block looks like in the documentation editor.

Code block: With code

And this is what your code block will look like in your published documentation.

                                                            alert("Hello, World!");

Add a code block

Code block: Menu

In the documentation editor, type /code and click Code block from the blocks menu to instantly add the block.

Code block: Empty

In the block property panel to the right of the editor, you can format the block.

  • Select a language from the Code formatting dropdown menu.
  • In the Caption field, you can add an optional caption that will be displayed below the block.

Once you're ready, you can start typing your code into the block, or paste it in.


Inline code

Plain text can also be formatted as inline code with the rich text editing bar.

Highlight the text and click the code icon button to convert it to an inline code block.

This is what inline code looks like.