Code blocks

Preserve spacing and line breaks in code or other preformatted text.


Code blocks let you post code in Workflowy in an easier to read format that preserves the spacing commonly used in code. They are useful for code, terminal output, formulas, or any text where spacing matters.

Create a code block

  1. Start on an empty bullet
  2. Type three backticks
  3. Enter or paste the content
  4. Press Enter three times to leave the code block

Slash command: You can also run /code block or choose Code block from the node menu.

Search operator: Use is:code-block in search to find code blocks and text inside them.

Convert several bullets

Converting several bullets into one code block combines their content with line breaks. Changing the code block back into bullets separates those lines again.

For code styling within a line of text, see Text formatting.


Up next
Quote blocks
Set quotations and referenced passages apart from surrounding content.