Add item with icon to a menu in Google Apps Script

空扰寡人 提交于 2020-01-06 03:36:07

问题


Is it possible to add a menu item with an icon (like the icons of undo/redo button) to a custom menu item?

The documentation of the Class Menu doesn't mention it, so I guess it's not possible, but maybe there's a way to achieve this?

Thanks!


回答1:


You can not use custom icons i suppose but you can use html character codes like this:

DocumentApp.getUi().createMenu('☁ Cloud')
  .addItem("🖋 Pen", 'showHtmlBlaBla')
  .addToUi();

You can look here for some codes



来源:https://stackoverflow.com/questions/50018095/add-item-with-icon-to-a-menu-in-google-apps-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!