A code block shows code in a SmartDoc with syntax highlighting, a fixed-width font and line numbers. Insert one from the slash command or type three backticks, then pick the language.
Example: the Information Security Policy in the Policy Statement field quotes the exact attestation statement every Tier 1 vendor signs. The policy owner puts it in a code block set to Plain Text, so the wording stands apart and nobody reformats it.
Plan Availability | All plan types. |
Permissions | Any member who can edit the record can add and edit code blocks in its SmartDoc. |
Platform | Web |
Related Reading |
Insert a code block
In the SmartDoc, type / at the start of a new line or after a space.
Type code, or find it in the Advanced group.
Select Insert Code Block. The cursor moves into the block.
Or type three backticks at the start of a line. The block appears with the cursor inside it.
Set the language
Select the code block.
Open the language list under the block.
Select the language. The highlighting changes at once.
The list includes these languages and formats:
Programming: C, C#, C++, Java, JavaScript, TypeScript, Python, Ruby, Go, PHP and Shell.
Markup: HTML, Markdown, XML, CSS and SASS.
Other formats: JSON, YAML and SQL.
Plain Text: the default. No highlighting.
Tip: Leave the language on Plain Text for wording that must not change, such as an attestation statement. You get a fixed-width block that stands apart from the text.
Turn word wrap off
Wrap is on by default. Select the three-line button beside the language list to turn it off. Long lines then run past the right edge, with a scrollbar.
Edit or delete a code block
Edit: type in the block. Change the language or the wrap at any time.
Delete: select the block, then select the trash can button. Its tooltip reads Delete.
Note: Save the record to keep your changes. Press Ctrl + Z (Cmd + Z on a Mac) to bring back a block you deleted.
Frequently asked questions
How do I insert a code block quickly?
How do I insert a code block quickly?
Type three backticks at the start of a line. The block appears and the cursor moves into it.
Which language is set by default?
Which language is set by default?
Plain Text. It gives a fixed-width block with no highlighting.
Can I turn off line wrapping?
Can I turn off line wrapping?
Yes. Select the three-line button beside the language list. Long lines then scroll sideways.
Can I use a code block for ordinary text?
Can I use a code block for ordinary text?
Yes. Leave the language on Plain Text to set wording apart in a fixed-width block.
Need more help? Ask the SmartSuite Community, where builders, administrators and the SmartSuite team answer questions about building on SmartSuite. For your account, billing or data, select the chat button in the lower-right corner of SmartSuite to reach support.
Last verified 1 Nov 2026.
