Google Docs integrates leading programming languages for slicker presentations

A phone bearing the Google Docs logo sits on a dimly-lit laptop keyboard
(Image credit: Getty Images)

Google Docs users will soon be able to seamlessly paste code into their documents, with the addition of ‘code blocks’ to the text editor’s smart canvas range of tools.

Through the new feature, users will be able to paste code to industry standards in a range of programming languages. Currently, the blocks support C/C++, Java, JavaScript, and Python.

The feature could prove useful for teams of developers, particularly those who have to regularly share their code with colleagues, either in a presentation setting or over video conferencing.

Before now, users seeking to paste code into Google Docs had limited options. It is possible to manually format code in Docs, as users who have set their documents to automatically detect text markup can type ``` and press ‘enter’ to manually type code (or paste it in with no formatting), and there are a number of third-party extensions and add-ons to perform this function.

However, manual editing can prove tricky and not a consistent process across even the most popular languages as it requires manual indentation and colouration of text that even a programmer may have to double-check, as this is performed automatically in any integrated developer environment (IDE).

Furthermore, employees using a company-issued laptop may not be able to add extensions to their Google Workspace; third-party add-ons could be viewed with suspicion by administrators.

Once rolled out, users can access the feature by selecting Insert then Building Blocks then Code Block. With an integrated solution for the problem, businesses will no longer have to rely on third-party solutions, and can benefit from future updates to the feature down the line such as the addition of more programming languages.

In a blog post on the new feature, Google noted that it will only be available for those with “Business Standard, Business Plus, Enterprise Standard, Enterprise Plus, Education Standard, Education Plus customers, and Nonprofit” accounts.

This means that at present, there are no plans to provide it to users with the cheaper business, enterprise, and educational accounts, nor for legacy and personal accounts.

A screenshot of a user selecting the new Code Block feature inside Google Docs

(Image credit: Google)

Building blocks were added as part of a wider suite of features added over the course of 2022, as the firm looked to bulk up the features of its smart canvas. These included the addition of more integrated tools with ‘@-mentions’, including a new email draft template to allow for collaborative crafting of important messages, as well as a chip for importing notes from a meeting within a user’s Google calendar.

RELATED RESOURCE

Flexible IT models drive efficiency and innovation

A modern approach to infrastructure management

FREE DOWNLOAD

Organisations that have their Google accounts signed up for Rapid Release, the company’s fast track programme for new features, will receive the update between 14 December and 29 December.

However, as Rapid Release can lessen the ability for organisation administrators to oversee new features before they are rolled out to their workforce, many businesses operate on Google’s Scheduled Release track, which typically lags behind Rapid Release by around one week.

For those in this category, Google has pencilled in 3 January as the release date, though has noted that it could take until 18 January until all users can access the feature.

IT Pro has approached Google for comment.

Rory Bathgate
Features and Multimedia Editor

Rory Bathgate is Features and Multimedia Editor at ITPro, overseeing all in-depth content and case studies. He can also be found co-hosting the ITPro Podcast with Jane McCallion, swapping a keyboard for a microphone to discuss the latest learnings with thought leaders from across the tech sector.

In his free time, Rory enjoys photography, video editing, and good science fiction. After graduating from the University of Kent with a BA in English and American Literature, Rory undertook an MA in Eighteenth-Century Studies at King’s College London. He joined ITPro in 2022 as a graduate, following four years in student journalism. You can contact Rory at rory.bathgate@futurenet.com or on LinkedIn.