Enhancing Google Apps Script with Object Literals for Document Styling

In Google Apps Script, managing styles in Google Docs can become cumbersome, especially when dealing with multiple styles across a large document. Object literals can streamline this process, providing a structured and reusable approach to handling styles. In this blog post, I’ll explain how using object literals can simplify the styling process in Google Docs … Read more

Creating a Responsive Modal in Google Apps Script UI

When designing web applications within the Google Apps Script environment, it’s crucial to ensure that UI elements like modals are responsive and look good on all devices, from desktops to mobile phones. This post will guide you through creating a responsive modal dialog in Google Apps Script using the HTML service, ensuring it adapts to … Read more

Building Web Layout Diagrams in Google Docs with Apps Script

Creating visual diagrams like web layouts directly in Google Docs can be a unique challenge, especially when you need to integrate dynamically fetched images into a structured format such as a table. Google Docs provides basic functionalities for handling images and tables but integrating them seamlessly requires a bit of scripting finesse using Google Apps … Read more

Adding a Watermark to PDFs Using Google Apps Script

In the modern digital workspace, protecting and branding your documents is crucial. One effective way to achieve this is by adding watermarks to your documents. Although Google Apps Script doesn’t directly support advanced PDF manipulations, you can still use it to create watermarked PDFs by leveraging Google Docs as an intermediary. In this blog post, … Read more

Client Side Code creation and Apps Script to get Sheet data to web app Client Side JavaScript

Instead of making an additional fetch request from the client-side to get the data, you will pass the data directly when the HTML page is initially served. Here’s how you can achieve this: Google Apps Script: Server-Side You’ll modify the doGet function to use an HTML template that includes the data. This allows the server … Read more

Apps Script Sheets to API endpoint webapp

To create a web application using Google Apps Script that outputs the contents of a Google Spreadsheet into a client-side JavaScript object, you’ll need to write code for both the server-side (Google Apps Script) and the client-side (HTML with embedded JavaScript). Here’s how you can set it up: 1. Google Apps Script: Server-Side First, you’ll … Read more

Mastering CSS – From Text Styling to Flexbox Layouts

Diving into the world of web development brings its own set of challenges and opportunities, particularly in the realm of CSS. This post explores three key areas of CSS that every budding web developer must understand: text styling, Flexbox layouts, and link pseudo-classes. Each segment includes code snippets, explanations, and practical applications to help you … Read more

Using Catch in JavaScript

In JavaScript, error handling is commonly done using the try…catch statement. The try block lets you test a block of code for errors, while the catch block lets you handle the error. Here are a few examples that demonstrate how to use catch to handle errors in different scenarios: 1. Basic try…catch try { // … Read more

How to Load, Draw on, and Save Images with HTML Canvas

In this tutorial, we’ll explore how to build a web application that allows users to load an image into an HTML canvas, draw on it, and then save their masterpiece. This feature is perfect for applications that require user interaction on images, such as photo editing tools, signature apps, and more. What You Will Need … Read more

How to Convert H4 Elements to Bold Text in Google Docs with Apps Script

You can achieve this task using Google Apps Script, which allows you to automate actions within Google Docs. The script below selects all H4 elements in a Google Doc and converts them to regular text that is bolded. This is done by finding all the text elements formatted as Heading 4, changing their attributes to … Read more