Step by step guide : How to add code blocks to google docs.
But first what exactly do we need?
The answer is we only need one add-on from Google Workspace Marketplace which is code blocks.
Code blocks make it easy to insert your code written in the most commonly used language into google docs. You just need to select your text in google docs and select format . You can also preview the selected text and change the theme as well.
Follow the below step-by-step guide on ” How to add code blocks to Google docs ” to easily add code blocks
Step 1: Open your google docs make sure you’re logged in to your google Gmail account.
Step 2: Go to addon menu and select Get add-ons as shown below.
Step 3: Once you click on Get add-ons you will be get the Google Workspace Martketplace screen
Type code blocks in the search bar as you see in the below screenshot the auto-suggest shows Code blocks as the first option when your type code.
Select the first search result code blocks as shown below
Step 4: Install the Code blocks addon.
Click on continue.
Once you click continue, it will prompt you to sign in to your Google Gmail account.
Sign in to your Gmail account.
Step 5: Click on “allow” to provide code blocks the necessary permission to access google docs
Step 6 : From the main menu goto ->Add-ons->Code Blocks->Start option as shown below
Once you click on the Start option it will pop up the Code block window
Step 7 : Type your code in google docs .
- Now your are ready to type your code in google docs .
- Check the drop down option under Languages in Code blocks window for all the supported languages.
Select your code and click on format. Your code will now appear as a Code block in google docs.
Another useful guide: