Use code blocks

Who can use this feature?

🔐 Only workspace editors can edit code blocks.

⭐️ Available on free and paid plans.

Workspace members can insert code blocks in items. Code blocks are helpful for sharing small snippets of code. This can be useful for technical collaboration.

SELECT
iso_year_week,
signups,
round((signups::NUMERIC / lag(signups) OVER(
ORDER BY iso_year_week) - 1) * 100, 2) AS growth
FROM (
SELECT
to_char(created_at, 'IYYY_IW') AS iso_year_week,
COUNT(*) AS signups
FROM USER
GROUP BY iso_year_week
)
signups
ORDER BY iso_year_week DESC

To add a code block

Using Markdown

  1. Move your cursor to an empty line inside the item in which you'd like to add a code block.

  2. Insert three consecutive ticks: ```

  3. A code block will appear in which you can type or paste code.

Using the insert menu

  1. Move your cursor to an empty line inside the item in which you'd like to add a code block.

  2. Click the red insert menu button.

  3. Select Code block.

    nuclino-insert-code-block
  4. A code block will appear in which you can type or paste code.

Using slash commands

  1. Move your cursor to an empty line inside the item in which you'd like to add a code block.

  2. Type /.

  3. Select Code block.

    nuclino-insert-code-block-2
  4. A code block will appear in which you can type or paste code.

To use syntax highlighting

  1. Move your mouse over a code block.

  2. Click the programming language picker in the bottom right of the code block.

  3. Choose a programming language.

    nyclino-syntax-highlighting