編輯器外掛程式使用者介面
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
編輯器外掛程式可透過自訂選單、對話方塊和側欄啟用使用者互動功能。如需建構這類介面的相關資訊,請參閱下列連結。
外掛程式選單是使用 Google Apps Script 的基本 Ui 服務建立而成。選單項目是使用外掛程式的起點,但您必須設計這些項目,並考量外掛程式的授權生命週期。
側欄和對話方塊是使用 Apps Script 的 HTML 服務建立。這項服務可讓您使用 HTML 和 CSS 定義介面結構和外觀。詳情請參閱「建立及放送 HTML」。
- 設定用戶端/伺服器通訊呼叫,讓介面中的使用者動作導致 Google 伺服器 (編輯器檔案所在位置) 採取動作,反之亦然。
- Apps Script 也提供範本語法,可簡化動態介面的建構作業。
為編輯器外掛程式建構 HTML 介面時,請使用編輯器外掛程式 CSS 套件,讓外掛程式的外觀和風格與擴充的 Google Workspace 編輯器一致。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2026-03-28 (世界標準時間)。
[null,null,["上次更新時間:2026-03-28 (世界標準時間)。"],[],["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"]]