Creating a modeless dialog
Now we will create a modeless dialog and see the difference between modal and modeless dialogs. Update the showDialog
function as shown here:
function showDialog() { var html = HtmlService.createHtmlOutputFromFile('Index'); DocumentApp.getUi() .showModelessDialog(html, 'Greeting'); }
Note that the showModalDialog
method has been changed to showModelessDialog
.
Modeless dialogs do not prevent you from doing other things, such as editing the document, and you can drag the dialog around as shown here:
Get Learning Google Apps Script now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.