How to work with code snippets in Zoho Writer
Overview
Use code snippets in Writer to document, review, and discuss code within your documents. Writer supports more than 13 common programming languages and provides formatting options such as themes and line numbering.
Prerequisites
- Code content ready to type or paste
Steps
How to insert a code snippet
- Place your cursor where you want to insert the code.
- Go to Insert tab --> Code.
- Type or paste your code into the code window.
- Select your programming language from the dropdown.
(Optional) Choose a theme and enable Line numbering.
How to add line numbers to code blocks
When inserting a code snippet, use the Line numbering toggle inside the code editor to show or hide line numbers.
Troubleshooting
1. Error/Symptom: Code snippet not appearing correctly
Possible cause: Incorrect language selection or formatting.
Solution: Reopen the code block, verify the language, and adjust the theme.
2. Error/Symptom: Line numbers not visible
Possible cause: Line numbering not enabled.
Solution: Edit the code block and enable the Line numbering option.