Is it possible to place a button on a google calendar? - google-apps-script

I know it can be done on a spreadsheet, like this, but is it possible to place a button on a google calendar? If not, do you know of something similar that might work?

It's possible to inject code HTML code in the description of an event, yet a button in the UI of a google calendar, no
https://developers.google.com/apps-script/reference/calendar/calendar-app#createeventtitle-starttime-endtime-options
in the attribute options you'll find the description

Related

Google Chrome extension - integrate with Google Calendar

How can a Chrome extension alter the Google Calendar event editing UI?
I see that, for example, the Moxtra extension has managed to inject UI including a button just below the location. According to their YouTube video they added a button to fill out the event description although when I installed Moxtra this no longer seems to work.
Stepping back from this a bit, it occurs to me that editing the Google Calendar page seems like something that could easily get messed up by future changes to Google Calendar. Perhaps it is better to edit the event description from the extension's own UI? If so, how can that be done?
Thanks.
It can be done with content scripts and modification of the DOM.
They probably check Event edit page for specific selectors and try to insert their own elements in the page, if they found it.
So, if UI of Google Calendar will change, extensions like Moxtra will be probably also broken.
You are right about the edit of the description - it's safer. But you still need to get a description field and change a content of it. There is no 100% safe way to do it and don't break on the change of UI.

How to show images on text hover in google docs addon

I am new to google docs Add-ons. I am working on an add-on in which I need to show set of image on text hover like tooltip in html
I did not find a way to implement this after hours of googling. please help.
This is not possible.
The above because the Documents Service of Google Apps Script doesn't include "on hover" event / trigger or something similar
The only way is by using a dialog or sidebar and they can only be launched by clicking on a custom menu or by using google.script.run on a previously opened dialog / sidebar.
References
https://developers.google.com/apps-script/guides/doc
https://developers.google.com/apps-script/guides/triggers
https://developers.google.com/apps-script/guides/dialogs
Related
Show Popup of YouTube video within Google Doc

Change background color of a Google Form using the App Script API

Is there a way to change the background color of a Google Form programmatically using the App Script API?
At the moment, there is no way to change the color of a Form via the App Script API. The only object the supports a .setTheme(theme) method is Site.
I know, I am sad, too.
Fortunately, once you generate a form programmatically, you can then edit it just like a regular form. You get the link to the editable page from form.getEditUrl().
Any changes you make there will be saved to the form itself. So, maybe you can just tinker around with it a bit at the end and it will look how you need it to.

Google Docs: Catching keyup events

I want to implement a custom autocomplete for google docs.
Therefore I would need to access any kind of text-input events within the document.
Are there any ideas how this could be done with App Scripts?
Google Docs doesn't have the onEdit() or onChange() event available to it.
https://developers.google.com/apps-script/guides/triggers/#available_types_of_triggers
I doubt that what you want is possible.
Inside of HTML, you can watch for a key event. But that would only be inside of a Dialog Box created with HTML, or a Sidebar with HTML.

How do I add a button on other UI element to a Google spreadsheet?

I want to add a ToggleButton to a Google Spreadsheet. I would like to be able to control the positioning and the text on the button. Is this possible?
If so, does anyone know of a good tutorial that covers these topics?
You can not interact with the spreadsheet environment UI except by adding a menu.
You can insert a drawing or an image and assign a function to it but the positioning of that "button" is only manual and not accessible programatically.
So,... unless you try to entirely recreate the spreadsheet layout in a personalized UI (which would be quite hard I guess /-) you have no way to do what you want.
I would suggest (as someone famous once said) 'Think differently'