Code Blocks
Code blocks in NocoDocs support syntax highlighting for 30+ programming languages. Use them to document code snippets, configurations, and technical content.

Insert a Code Block
Use one of these methods:
- In the editor, type
/code. Then select Code Block. - Type
```, then pressEnter.
Select a Language
- At the top-left of the code block, click the language selector.
- Search for a language, or select one from the list.
Supported Languages
Some frequently used languages are:
| Category | Languages |
|---|---|
| Web | JavaScript, TypeScript, HTML, CSS, JSON |
| Backend | Python, Java, Go, Rust, C, C++, C#, Ruby, PHP |
| Shell | Bash, Shell, PowerShell |
| Data | SQL, YAML, TOML, XML |
| Other | Markdown, Dockerfile, GraphQL, Kotlin, Swift, Dart |
Features
| Feature | What it does |
|---|---|
| Copy Button | Click the copy icon at the top-right of the code block. The contents go to the clipboard. |
| Tab Indentation | In code blocks, Tab adds indentation. It does not move to the next element. |
| Syntax Highlighting | Colors update automatically for the selected language. |
Mermaid Diagrams
When you select Mermaid as the language, the code block shows a rendered diagram, not the highlighted source. For details, refer to Mermaid Diagrams.
Last updated on
Latest product updates?See Changelog