When using Insert Code Block, the most common questions fall into 3 areas: language support, display settings, and insertion methods; this page includes 3 common answers.
FAQ
Which programming languages does the code block support?
- Insert a code block first.
- Click the language name at the top left of the code block.
- Select the programming language you want from the list and continue editing.
You can switch the code block to different languages. The feature example explicitly shows switching to languages such as C, which helps match the display to the code content.
Can I turn on line wrapping for a code block?
- Select an inserted code block.
- Click Settings on the code block toolbar.
- Turn Line Wrap on or off to change how long lines are displayed.
If your code is long, line wrapping can make it easier to read within the document page.
Why can’t I find the code block entry?
- Confirm that you are working in an editable smart document.
- Check whether the Insert tab includes the Code Block entry.
- If you do not find it in the ribbon, type
/代码块or/codein the document body to try inserting it.
If the entry is still unavailable, update to the latest version of WPS Office for Mac and check again.
Glossary
| Term | Definition |
|---|---|
| Code block | A separate area in a document used to display code content with a layout that is easier to read than normal body text. |
| Syntax highlighting | A display method that distinguishes code elements based on programming language rules to improve readability. |
| Line wrap | A display option that moves long lines onto the next visual line at the edge of the block to reduce horizontal scrolling. |