- Bash shell
- C
- C++
- C#
- CSS
- Dart
- Go
- HTML
- JavaScript
- Perl
- PHP
- PowerShell
- Python Java
- R
- Ruby
- Rust
- Scala
- SQL
- Swift
When someone is working in your code block’s contents, Box displays a collaboration icon in the code block’s text field identifying the person’s user name.
Collaborators with Read-only permission can view but not edit a code block’s contents.
Note:Box Notes does not support the insertion of other Box Note elements — for example, tables, images, call-out boxes, headings, or other code blocks — into code blocks. To learn more about using other Box Notes elements, start here.
- Click where you want to insert a code block. Beside the cursor, Box displays +.
- Click + then select Code Block.
- Type or paste the code into your code block’s text field.
- In the top-left corner of the code block, click the menu icon. Box displays a drop-down menu.
- In the drop-down menu, click the software language you want to use. After selecting a language, you cannot select a different language for this code block.
- In the top-left corner of the code block, click the menu icon. Box displays a drop-down menu.
- In the Search Languages field, type the name of the software language you want to use. As you type, Box displays available languages.
- Click the software language you want to use. After selecting a language, you cannot select a different language for this code block.
- In the top-right corner of the code block, click the ellipsis, ”…”.
- Select Remove.
- Hover your mouse in the code block, then right-click.
- To increase height, click Expand. To decrease height, click Collapse.
- From the context menu: Click the ”+” menu and select Mermaid directly — the language is pre-selected.
- From a code block: Add a code block, then choose Mermaid from the language dropdown.
- Using Box AI: Ask Box AI (inline or from the side panel) to generate diagrams and charts for you. You can also highlight a table and ask inline AI to generate a Mermaid pie chart from it.