Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
编辑器插件界面
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
编辑器插件可通过自定义菜单、对话框和边栏实现用户互动。以下链接提供了有关构建这些类型界面的信息。
插件菜单是使用 Google Apps 脚本的基本 Ui 服务创建的。菜单项可为使用插件提供起点,但您必须在设计时考虑插件的授权生命周期。
边栏和对话框是使用 Apps 脚本的 HTML 服务创建的。
借助此服务,您可以使用 HTML 和 CSS 定义界面结构和外观。如需了解详情,请参阅创建和提供 HTML。
- 设置客户端-服务器通信调用,以便界面中的用户操作导致在编辑器文件所在的 Google 服务器上执行操作,反之亦然。
- Apps 脚本还提供了一种模板语法,可让您更轻松地构建动态界面。
为编辑器插件构建 HTML 界面时,请使用编辑器插件 CSS 软件包,使插件的外观和风格与所扩展的 Google Workspace 编辑器保持一致。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-04-01。
[null,null,["最后更新时间 (UTC):2026-04-01。"],[],["Editor add-ons allow user interaction via custom menus, dialogs, and sidebars. Menus, built with the Ui service, serve as starting points, requiring design consideration for the add-on authorization lifecycle. Sidebars and dialogs, created using the HTML service, utilize HTML and CSS for interface design. Client-server communication enables actions on the server based on user interface interactions. The editor add-on CSS package maintains a consistent look and feel with Google Workspace editors. Dynamic interface creation is supported via a template syntax.\n"]]