Common questions about Insert Code Block usually focus on where to find the entry, how language display works, and how to improve readability; this section includes 4 frequent questions and a glossary.
FAQ
Why can’t I find the Code Block entry?
- Make sure the current file is an editable Smart Document.
- Check whether Code Block appears on the Insert tab.
- If you do not see it on the ribbon, type
/in a paragraph and search for代码块orcode. - You can also move the pointer to the left side of a paragraph and look for the + entry.
Which programming languages does the code block support?
- Insert a code block first.
- Click the language name at the top left of the block.
- Switch to the programming language you need from the list.
- Check whether the code is displayed with the matching syntax highlighting style.
Can I turn on wrap for long lines in a code block?
- Select or focus the code block.
- Open Settings at the top of the block.
- Find the Wrap option.
- Turn it on or off based on your reading needs.
How can I make a code block easier to present or read?
- Choose the right language at the top of the block.
- Select Fixed Height or Fit Content based on the code length.
- Turn wrap on when you want to reduce horizontal scrolling.
- Turn on Dark Theme if you prefer stronger visual contrast.
Glossary
| Term | Definition |
|---|---|
| Code block | A separate area in a document used to display code content with clearer formatting and language-based styling. |
| Syntax highlighting | A display style that uses different formatting for keywords, strings, comments, and other code elements to improve readability. |
| Wrap | A display option that moves long lines to the next visible line inside the code block instead of requiring more horizontal scrolling. |
| Dark theme | A viewing style that uses a darker background for the code block to improve contrast for some reading situations. |