Use code blocks

Who can use this feature?

🔐 Only workspace members with full access can add and edit code blocks.

⭐️ Available on all 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 on the insert button, the red + icon.

  3. Select Code block.

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

nuclino-add-code-block

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.

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

nuclino-add-code-block

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. Select a programming language.

nuclino-code-block-syntax-highlighting

To maximize or minimize a code block

  1. Right-click on the code block.

  2. Select Maximize to allow the code block to take up more horizontal space.

  3. Select Minimize to restore the default width of the code block.

nuclino-maximize-code-block

To wrap lines in a code block

  1. Right-click on the code block.

  2. Select Enable wrapping.

nuclino-code-block-enable-wrapping

To copy a code block

  1. Right-click on the code block.

  2. Select Copy.

nuclino-copy-code-block

To delete a code block

  1. Right-click on the code block.

  2. Select Delete.

nuclino-delete-code-block