
If I misunderstood your question and this was not the result you want, I apologize. After selecting a shape, draw that shape on your screen. On the following screen, click the Shape icon, select a shape category, and then choose the shape you want to add as a text box to your document. Click the Insert > Drawing > New option at the top. About dateStr, this was used from your script. Make sure your document is open with Google Docs.Var offset = body.getChildIndex(cursor.getElement()) īody.insertParagraph(++offset, "Some Header\n") īody.insertListItem(++offset, color + ": ").setGlyphType() īody.insertParagraph(-offset + colors.length, "sample text") // Please set the text here.ĭocumentApp.getUi().alert('Cannot find a cursor in the document.') This will create a new transparent canvas from which you can work from. Not your computer Use a private browsing window to sign in. With your Google Doc open, click Insert in the main toolbar, and then Drawing > + New.

Forgot email Type the text you hear or see. Here is what I have: function onOpen() ĭateStr = today.toLocaleDateString("en-US", options) + '\n\n' Access Google Docs with a personal Google account or Google Workspace account (for business use). I'm a bit stuck on how to add text and list items at the same time. I'm trying to create a simple script that prefills a template into a Google doc at the cursor point.
