I am using Chrome on OSX.
Chrome developer tools has a shortcut CMD OPTION C which activates "Select node to inspect" function of chrome developer tools.
The same CMD OPTION C shortcut is used in Google Docs for "Copy formatting".
When I use CMD OPTION C shortcut in Google Docs, it only activates Chrome developer tools, but "Copy formatting" is not performed.
Both, Google Docsand Chrome does not allow to change these shortcuts...
I have found that it is possible to disable Chrome developer tools, but I would like to keep an option to quickly activate developer tools, since I might need to use it occasionally.
This works for me:
Copy format: CMD C (just like normal)
Paste format: CMD OPTION V
You can check this shortcut in the Menu Tabs when you go to "Edit" > "Paste special" > "Paste format only"
Related
I recently noticed that when I deploy a new version of web app, it gives me a new URL instead of using the old one. The problem is I use the web app as webhook, which is so annoying for me to replace the webhook URL every time I make some changes. Also, the old version doesn't get archived automatically when I deploy a new version. Is it a new policy? Is there any way to revert this setting?
Note: I'm using the new editor. But I find the old editor is also performing the same issue.
If you want to keep the same web app URL, or the same project ID (if you shared your script as a library), use the "Manage deployments" option in the new code editor.
Steps:
click on "Manage deployments"
select your existing deployment
click on the edit / pencil button
click on the Version dropdown
click on "New version" in the dropdown
click on the "Deploy" button
Don't click on the "New deployment" menu entry.
Reference:
Edit a versioned deployment
Based on Installed and Enabled states of Editor add-on, I have written code for each states on Google Sheets add-on.
The code is working fine when I test it using the script editor with INSTALLATION CONFIG set to Installed and Enabled. But when I test the published addon after installing, the state always remains disabled for the document.
To enable the add-on, I have to manually go to Add-ons >> Manage add-ons >> Click on the three dots of my installed add-on >> Click on "Use in this document". Please find below screenshot:
Now I need to know whether programmatically it's possible to enable the add-on for the document or not. I tried but couldn't find a way to perform it programmatically.
Any help or suggestions would be helpful.
Edit
I have found that Data connector for Salesforce is already doing this. After clicking "Click to enable the add-on", "Use in this document" gets ticked. So there must be some way to programmatically enable the addon. I have scoured each Google App Script article but I haven't found any piece of code to achieve this.
Thanks.
There's no way to programmatically enable an add-on for a spreadsheet.
As you can see in the reference you shared, enabling an add-on for a document can be done the following ways:
Getting an add-on from the store while using that document, or
Using a previously installed add-on in that document
You have to take into account that an add-on can be enabled for a document, not for a user or for a domain, so having the add-on enabled for all documents by default kind of breaks the idea behind enabling and the related Authorization modes.
Enabling an add-on via onOpen:
If your add-on contains an onOpen trigger that adds an add-on menu with an item with which you can call an add-on function, clicking this item will effectively enable the add-on for your document. See, for example, The complete lifecycle.
File a feature request:
In any case, you can try filing a feature request in this Issue Tracker's component if you think this functionality could be useful.
Reference:
Installed versus enabled
I am trying to publish a spreadsheet web add-on but getting following error.
There is no API Console project with the id specified in the
manifest's api_console_project_id field
Can anyone tell me why I am getting this error ?
Gosh... not sure why this was so hard.
If Google are reading this: it'd be more user-friendly to run the various API checks before the user selects to publish their add-on and/or provide a link to the correct documentation! Then fix that super cryptic error message.
Anyway, if you are stuck with this error, this is what you need to do. (Thanks Tanya Gupta for putting me on the right track).
Step 1: Enable the GSuite Marketplace SDK
Follow these steps:
From the Script Editor, open the Resources menu item then select Cloud Platform Project
Click the button View API Console (you can also click the link with your project ID)
Click the hamburger (navigation) icon on the top left and select "APIs & Services" then "Library"
Search for "GSuite Marketplace SDK". It's important you install the SDK (software development kit) not the API.
Click the ENABLE button
You should now be able to see an option for Configuration in the menu on the left.
Step 2: Configure the GSuite Marketplace SDK
For configuration you will need to:
select at least one language and enter an application description (for your add-on). The name should be pre-filled and match your script name.
upload some icons of various sizes
add a Terms of Service URL (I initially used a public Google Doc for my T&Cs but this would not pass the new OAuth client requirements which require a verified domain. If you don't have a verified domain then users will see a security warning when installing your add-on. You - apparently - can use Github pages but please don't quote me on that.)
enable at least one Add-on extension
When you enable the Add-on extension, you will need to provide the following information:
Add-on Script Project Key can be found from the Script Editor. Go to File > Project Properties and copy the value for Project key (Deprecated)
Add-on Script Version is the version of your script. You can find the version in the Script Editor. Go to File > Manage Versions and select the latest version of your script.
Note: your add-on script version will be updated automatically when you publish new releases of your add-on.
Google documentation:
https://developers.google.com/gsuite/add-ons/how-tos/publish-for-domains#before_you_publish
Just to build on Dagmar's Answer
Solve this issue in 8 steps with Pictures:
On Apps Script Menu Bar, go to Resources > Cloud Platform project...
On Google Cloud Platform, go to the left navigation menu Select APIs & Services > Library
In the search bar that appears, type in "GSuite Marketplace SDK" Hit Search, once it appears click it.
Click on "ENABLE"
Once you click Enable in step 4. the screen below should appear. Select "CONFIGURATION"
Fill the document as you deem fit, but the most important part is shown below.
Scroll Down to Editor Add-on extensions, then select the Google App you're building your add-on for. It's the same process for Docs, Forms Sheets or Slides Add-ons
How to Get Script Project Key. Go back to your Apps Script Page.
Go to File > Project properties. Select the 'Info' tab. Then copy the value of Project key (Deprecated) and paste into the "Script Project Key" field
How to Get Script Version. Still on your Apps Script Page.
Go to File > Manage versions....
Then copy the value of Version and paste into the "Script Version" field
Click Save Changes and voila you're done. Do not forget to add the privacy policy URL and other required info, else the changes will not be saved
If you are publishing on Google Apps Marketplace, you need to not only enable the API, you also need to configure it by entering the needed settings.
1) First click on the enabled API as per image below:
2) Then click on configuration.
3) Then fill out the values as per below:
4) Particularly important are (not shown here):
a) including correct oauth scopes (File->Project Prop->Scope from your script file)
b) Docs Add On Project Key (File->Project Properties->Info->Project key)
c) Docs Add On Script Version (from the developer console)
Now if you go back and publish you should no longer have the error
I am developing an add-on for a Google Form. After I have made changes to the source code, how can I get the latest version of the add-on running in my Google Form? I have tried reloading the Google Form, I still have an older version of the add-on showing up.
Also, when I create a second Google Form, I don't see how to add my add-on under development (not published yet) to the form. When I got to Tools > Script Editor, I don't see my add-on project under "Open a recent project", but I can see it in my Google Drive.
In the "Publish" menu, choose "Deploy as add-on . . " A dialog box will pop-up. Fill in all the required information, then click "Update Webstore Draft". You will be taken to the "Developer Dashboard" IF you have payed the $5 dollars to get your Add-on published.
You can publish your Add-on privately to "Testers".
Whenever I refresh a spreadsheet (after having changed some of its Apps Scripts code) with CMD - R, Safari closes the script editor tab automatically.
How can I avoid that this tab is being closed?
Make an edit in the script, but don't save. Refresh the spreadsheet. The tab with the script will ask you if you want to close the tab, so say no. It won't close on you anymore after that.
Also, you can use Tools > Script Manager from the spreadsheet to run functions, or even run them directly from the script editor if you don't want to refresh.