Code Blocks

Add syntax-highlighted code blocks in NocoDocs.

Code blocks in NocoDocs support syntax highlighting for 30+ programming languages, making it easy to document code snippets, configurations, and technical content.

Code

Insert a Code Block

  1. Type /code in the editor and select Code Block.
  2. Alternatively, type ``` followed by Enter to create a code block.

Select a Language

  1. Click the language selector at the top-left of the code block.
  2. Search or select from the list of supported languages.

Supported Languages

Some of the commonly used languages include:

CategoryLanguages
WebJavaScript, TypeScript, HTML, CSS, JSON
BackendPython, Java, Go, Rust, C, C++, C#, Ruby, PHP
ShellBash, Shell, PowerShell
DataSQL, YAML, TOML, XML
OtherMarkdown, Dockerfile, GraphQL, Kotlin, Swift, Dart

Features

  • Copy Button — Click the copy icon at the top-right of the code block to copy its contents to clipboard.
  • Tab Indentation — Use Tab within code blocks for indentation (instead of navigating to the next element).
  • Syntax Highlighting — Colors update automatically based on the selected language.