How to add a dropdown list inside the comment dialog in google doc - google-drive-api

I am working on a .NET web application, where google doc will be embedded in pages. When users want to post a comment in the google doc, they will need to first choose a category from a dropdownlist. This way, I plan to tag/categorize the comments. I wonder if this is possible.

Related

Put the URL (prepended with the text "Parent_") for a particular Google Doc into that Google Doc's own header and footer

Overview
Essentially I want to be able to migrate my Google Docs to a regular website while maintaining the links I had created between my Google Docs.
A proposed solution
What do you think about having a Google Apps Script put the URL (prepended with the text "Parent_") for a particular Google Doc into that Google Doc's own header and footer, once and only once, when that Google Doc is initially created? (I almost never use headers and footers therefore it seems like it might be reasonable to use them as if they were akin to fields in a database).
For example,
Create a Google Doc.
Let's say, that Google Doc, has the following URL https://docs.google.com/document/d/1XwCyQ2MAIJgcLwfmR9-_JQq97H9iVLbGXNbpbzq1-Oo/
Put Parent_https://docs.google.com/document/d/1XwCyQ2MAIJgcLwfmR9-_JQq97H9iVLbGXNbpbzq1-Oo/ into the header and footer.
That way when a Google Doc is exported as an HTML document, it will contain 2 instances of the following string: Parent_https://docs.google.com/document/d/1XwCyQ2MAIJgcLwfmR9-_JQq97H9iVLbGXNbpbzq1-Oo/ into the header and footer
Then, with a simple find/replace (RegEx) the HTML files could be relinked.
To be safe, I might run a Google Apps Script once a week to confirm that each Google Doc contained two instances of "Parent_" followed by the URL.
Finally, what if, say, once a week I were to export my Google Doc's as HTML files, upload them to a regular website, and run, say, a Python script to ensure that every Google Doc that contained "URL001" that was not prepended with "Parent_" actually linked to "Parent_URL001"
Fundamentally, it's a kludge. I know that. But I'm trying to circumvent, what is effectively, a "soft lock-in" feature in Google Docs for those who create hyperlinks between Google Docs.
My problem described in detail
Frequently I link one Google Doc to another Google Doc. As a result, I have created something that is similar to a wiki. For example let’s suppose I had created two Google Docs: Google Doc #1 and Google Doc #2.
Subsequently let’s suppose I had created a link (a hyperlink) in Google Doc #1 to Google Doc #2. Of course that's an extremely simple example. Let’s make it more complex. Imagine I had created a couple of thousand Google Docs with many links (hyperlinks) between them.
Of course backing up those Google Docs would be trivial either by using Google Takeout or rsync. However, what would happen if I wanted to move those Google Docs to a regular website? Then the myriad hyperlinks I had created would fail to point to the documents on my regular website.
That is, on my regular website, if I were to click on the link on the page which contained the contents which had been contained in Google Doc #1 (https://my_regular_website.com/google_doc_001) then instead of opening a link on my regular website to the page which contained the contents which had been contained in Google Doc #2 (https://my_regular_website.com/google_doc_002) , the link would point to the original Google Doc #2 (https://drive.google.com/drive/folders/google_**doc_002**)
Why not use Notion or at least a wiki?
I like using Google Docs as a word processor. Sometimes I use Google Docs to write essays. Sometimes I use Google Docs to create documentation. Sometimes I use Google Docs to collaborate with others (instead of emailing). Furthermore, I often use Google Docs’ outline format, styles, and voice typing.
As far as I know, neither Notion nor any wiki have all of the features listed above.

Embedding Editable Google Sheets: Need Mobile-Friendly View

Problem:
I need a Google Sheet on our members' daily workout signup page to be both editable and mobile-friendly.
Details:
We have a members-only page on our community rowing club Weebly site that includes an editable schedule. It's a Google Sheet open to all members to sign up for workouts. On desktop it's a properly formatted, editable doc but it's a mess on mobile. All of the tab names are superimposed on top of the table itself in large blue font. Looks like this:
members page mobile view
I've tried embedding the document using the Google Sheet embed code (File--Publish to the Web--Entire Document--Web Page) but this is a view-only, uneditable version. I've set the share settings to "Anyone on the internet with this link can edit" and it still isn't editable once it's embedded on our Weebly site.
The site was built by another volunteer a few years ago. This is the editable but mobile-messy embed code we're using now:
iframe width=1400 height=900 src="https://docs.google.com/spreadsheets/d/FILENAME/edit?usp=sharing"></iframe
And here's the embed code provided by Google Sheet that gives us an uneditable but properly formatted table:
iframe src="https://docs.google.com/spreadsheets/d/e/FILENAME/pubhtml?widget=true&headers=false"></iframe
I've replaced "pubhtml?" with "edit?" but that doesn't work. I've added the widget=true&amp parameter to the new embed code; also unsuccessful. Can't find anybody else with the same problem and Weebly can't help me.
Thanks in advance if anybody can help out. I'm clearly not a developer, just a volunteer and fellow member of the club hoping to help.
Some options:
If you can get your users to install the sheets app on their phone then you can link out to the normal sheets url and it should open on the mobile app.
Use Google Forms for data entry.
Sheets is exposed as an API. There may be a 3rd party tool (that stores the data to a sheet of your choosing) that would help out your specific workflow.

How to generate an HTML view in App Script from a Google Sheet

I have a client that uses Google forms to take orders and wants to be able to turn the resulting Sheet into a document of Packing Slips. Being a python person I am currently taking her .tsv and making nice HTML printable docs but want to be able to make a plug-in for her so that on any Sheet of this type she can click "Make Packing Slips" and it either opens a new tab with generated HTML (I'm ok using googles templating) or maybe even convert the HTML into a PDF and save it to her drive? Either way I'd rather design the document all in HTML and CSS rather than trying to make a google doc if at all possible. Is the feasible? Any starting points? Thanks!
You need to learn about Google App Script => https://developers.google.com/apps-script/overview
Then these Links should suffice
HTML Service: Create and Serve HTML
Google Container-bound Scripts for Google App Script (Can not post link for this due to low reputation)

How to Add Hyperlinks to Google Forms user Google Apps Script

I'm trying to use Google Apps Script to add hyperlinked rows to a GridItem, ideally that act as tooltips. Am I trying to do more than is possible with Google Apps Script?
Here's the situation: I have a GridItem type question that has lengthy row descriptions. To clean up the interface, I'd like to present a short summary of the description that, when clicked/hovered, reveals the full text. To do this, I'd need to turn the short summary into a hyperlink. However, I haven't seen any way to insert hyperlinks in GridItem rows. I thought that Google Apps Script may allow me to do this.
So far, I've tried entering a string followed by .setLinkUrl(), using createAnchor('text', url), using markdown, and actually inserting, as text, <a href='http://google.com'>Google</a>' for the row. Nothing has worked so far.
Is this possible at all?
EDIT:
I apologize - I didn't research this question well enough before posting. Turns out Google Forms auto-detects URLs and posts them as links in the live form. I still have an issue with this, though - I'd rather have some specified text displayed to the user instead of the URL (some of my URLs are lengthy). Anyone know how to do this?
You can design the main elements of the Google form the normal way. Then preview the live form, copy the generated html file, hosted in your website.
Then you can replace the <a>...</a> tag that is generated by Google Form by one you need e.g. <a href='http://google.com'>Google</a>
keep sure you don't disturb any styles or code that may be needed by the Google form to work.
This solution need to have your own web hosting.
You will need to point your users to your website not the live form preview.

Is there an example of how to add Replace to Google Docs

Is there an example anywhere of how to use the Document apps-script API to add a button to the Google Docs menu, when it is clicked bring up a web page from my web app that prompts the user for 2 strings, then on OK it does a search & replace on the open document?
I don't need to add search/replace per-se. I just figure this is the simplest example of writing an Add-In to Google Docs that edits the open document.
thanks - dave
As it stands, this is not possible. I think this issue (which you might like to star so that you can receive updates in the thread) best describes it. Summary in post #7:
This feature request is to add the same script functionality to a
document as there is in a spreadsheet. ie menu items etc.
A recent video by google (see their blogs) hints that this will be soon available.
In the meantime u can ask for the document url from your published script interface.
If you make a googledrive.com client app you can even use the new goglepicker to select the doc.