问题
Is there a way to show a modal dialog in Gmail add-on, similar like in Spreadsheets add-on
SpreadsheetApp.getUi().showModalDialog(html, title);
Looks like no and the only way to display some UI to a user is to use Cards
However, I would like to be sure that it's correct. Couldn't find any article that it's not possible and working solution as well.
Thanks for any comments!
回答1:
You are correct. If you want to add a UI to GMail using an Add-on you have to use their Cards feature. You can read the restriction here:
Use client-side scripting
You can't design a custom UI for your add-on using HTML, CSS and Javascript. Gmail add-ons use a widget-based approach to building user interfaces. This allows the add-on to work well on desktop and mobile platforms without requiring you to build an interface for each.
来源:https://stackoverflow.com/questions/48993322/is-there-a-way-to-show-a-modal-dialog-in-gmail-add-on