Google Workspace 插件扩展的 Google Workspace 应用,例如 Gmail 或 Google 日历。
基于 HTML
用户界面是使用 HTML 和 CSS(而非 Google Apps 脚本内置的卡片服务)定义的插件。只有较早的编辑器插件是基于 HTML 的。
链接预览触发器
当用户在 Google 托管应用(例如 Google 文档)中与第三方或非 Google 网址互动时,系统会触发链接预览触发器。借助链接预览触发器,您可以定义要从服务或 API 中预览的网址模式,并配置预览内容,包括智能条状标签和预览卡片。链接预览触发器在插件脚本项目的清单中进行配置,因此是一种清单触发器。
智能条状标签是指在 Google Workspace 应用中提及的人员、文件、日历活动或其他实体。当用户将鼠标悬停在条状标签上时,还可以预览与文件或链接相关的其他内容。例如,当用户将鼠标悬停在 Google 幻灯片演示文稿的条状标签上时,会看到幻灯片的屏幕截图、演示文稿的所有者,以及他们是否之前查看过该演示文稿。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-12-18。"],[[["\u003cp\u003eThis documentation provides definitions for common terms used in Google Workspace add-on development.\u003c/p\u003e\n"],["\u003cp\u003eUnderstanding these terms is essential for navigating the documentation and creating effective add-ons.\u003c/p\u003e\n"],["\u003cp\u003eThe glossary covers concepts like add-on types, UI elements, triggers, and the interaction between client-side and server-side code.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can find links to more detailed information within each definition to further expand their understanding.\u003c/p\u003e\n"]]],["This document defines terms related to Google Workspace add-ons. Key concepts include: **Calendar conferencing add-ons** (for third-party conferencing), **cards** (UI pages), **card-based** add-ons, **conference data/solutions**, **context** (host app state), **contextual triggering**, **editor add-ons**, **event objects** (data passed to the server), **Gmail add-ons**, **homepages**, **manifest** (project configuration), **manifest triggers**, **sidebar**, **smart chip**, **trigger** (event response), **trigger function**, **widget** (UI element), and **widget handler functions**.\n"],null,["# Glossary\n\nThe following terms are used throughout this documentation.\n\n### Calendar conferencing add-on\n\nA special kind of add-on used to allow conferencing providers to present\nconferencing options in Google Calendar events. These add-ons require\na well-developed conferencing solution for the add-on to connect to.\nBecause of this requirement, most developers never have\na need to create a Calendar conferencing add-on.\n\nSee [Calendar conferencing add-ons](/workspace/add-ons/concepts/types#calendar_conferencing_add-ons)\nfor more information. Also see\n[Upgrading your published add-ons](/workspace/add-ons/how-tos/upgrade-addons)\nfor information on how to convert a Calendar conferencing add-on into a\nGoogle Workspace add-on.\n\n### Card\n\nA single \"page\" of an add-on UI. Cards are composed of different widget objects\n(buttons, text fields, headers, and so forth).\n\nSee [Cards](/workspace/add-ons/concepts/cards) for more information.\n\n### Card-based\n\nAn add-on whose user interface appears as a pane in the sidebar (or, on mobile,\nas another activity window reached through the menu). The add-on has a top\ntoolbar that identifies the add-on and displays a card---essentially a \"page\"\nof the add-on's UI.\n\nGoogle Workspace add-ons are card-based.\n\n### Conference data\n\nThe set of information Google Calendar needs in order to let users create and\njoin third-party conferences enabled by a\nGoogle Workspace add-on or Calendar\nconferencing add-on.\n\nSee [Conference data](/workspace/add-ons/calendar/conferencing/overview#conference_data)\nfor more information.\n\n### Conference solution\n\nA representation of a third-party conference that can be created from\nGoogle Calendar using Google Workspace add-on or\nCalendar conferencing add-on.\n\nSee [Conference solutions](/workspace/add-ons/calendar/conferencing/overview#conference_solutions)\nfor more information.\n\n### Context\n\nThe current state of the host application. For example, which message currently\nopen in Gmail, which Calendar event you are editing, or which Drive files you\nhave selected are part of the host application's current context. Context,\nalong with other information, is collected into an event object that is passed\nto the trigger function as a parameter.\n\n### Contextual triggering\n\nThe practice of defining triggers that fire when the user enters a specific\ncontext, such as when they open an email thread in Gmail. Contextual triggering\nlets your add-on to provide a UI that is relevant to that context. Contextual\ntriggers are configured in the add-on script project's\n[manifest](/workspace/add-ons/concepts/workspace-manifests) and thus are a\ntype of\n*manifest trigger*.\n\n### Editor add-ons\n\nThe original set of add-ons types that only allowed extensions of Google Docs,\nSheets, Forms, or Slides. Editor add-ons are not card-based; rather, they\nrequired the developer to create a UI from raw HTML and CSS. Each editor add-on\ncan only extend one host application.\n\nSee [Editor add-ons](/workspace/add-ons/concepts/types#editor_add-ons) for more\ndetails.\n\n### Event object\n\nThe JSON object that is automatically created when homepages are requested,\nwhen the add-on enters contexts it needs to respond to, or as the result of\nuser interactions with widgets in the add-on interface. Once created,\nevent objects are passed to a specified trigger function or\ncallback function. The purpose of event objects is to pass information from\nthe user's client-side environment (such as information they've entered into\nthe add-on interface widgets) to the add-on's server-side code, which then\ncan act on that information and return the appropriate response.\n\nSee [Event objects](/workspace/add-ons/concepts/event-objects) for more\ndetails.\n\n### Gmail add-ons\n\nAn add-on that extends Gmail only. Gmail add-ons are card-based. Much of the\nfunctionality, behavior, and development details used to create Gmail add-ons\nis identical to same details used to create\nGoogle Workspace add-ons.\n\nSee [Gmail add-ons](/workspace/add-ons/concepts/types#gmail_add-ons) for more\ninformation. Also see\n[Upgrading your published add-ons](/workspace/add-ons/how-tos/upgrade-addons)\nfor information on how to convert a Gmail add-on into a\nGoogle Workspace add-on.\n\n### Homepage\n\nThe root UI card of an add-on. Homepages are displayed when users open the\nadd-on, and let your add-on to show content outside of a specific context\n(for example, when the user is viewing their email threads in Gmail, but hasn't\nopened one). You define the appearance and behavior of your add-on homepage\nlike any other card.\n\nSee [Homepages](/workspace/add-ons/concepts/homepages) for more information.\n\n### Host or Host application\n\nThe Google Workspace application a\nGoogle Workspace add-on\nextends, such as Gmail or Google Calendar.\n\n### HTML-based\n\nAn add-on whose user interface is defined using HTML and CSS instead of the\nApps Script built-in [Card service](/apps-script/reference/card-service/card-service).\nOnly older [Editor add-ons](/workspace/add-ons/concepts/types#editor_add-ons)\nare HTML-based.\n\n### Link preview trigger\n\nLink preview triggers fire when users interact with a third-party or non-Google\nURL within a Google host application, such as Google Docs. Link preview\ntriggering lets you define URL patterns to preview from your service or API, and\nconfigure the preview content, including the smart chip and preview card. Link\npreview triggers are configured in the add-on script\nproject's manifest and thus are a type of manifest trigger.\n\nSee\n[Preview links with smart chips](/workspace/add-ons/editors/gsao/preview-links)\nfor more information.\n\n### Manifest\n\nA JSON file attached to an Apps Script project. The manifest is used to define\nproject information the script needs to run correctly. For\nGoogle Workspace add-ons, the\nmanifest is used to specify what hosts the add-on can extend and provide\ncertain UI control settings.\n\n### Manifest trigger\n\nA trigger that is defined in a project's manifest, such as a homepage\ntrigger or contextual trigger. Manifest triggers are used exclusively to\ncreate and display new cards when an add-on homepage is requested or the add-on\nenters a context that requires a display update.\n\nManifest triggers are distinct from other triggers in Apps Script because they\naren't built-in (like\n[simple triggers](/apps-script/guides/triggers)) and can't be be created\nprogrammatically with the Apps Script\n[Script service](/apps-script/reference/script) (like\n[installable triggers](/apps-script/guides/triggers/installable)).\n\n### Non-contextual cards\n\nCards that show content when the user is outside a specific context; for\nexample, when viewing their email threads in Gmail, but hasn't opened a one.\nHomepages are a kind of non-contextual card.\n\n### Sidebar\n\nThe section on the right of the host UI where a\nGoogle Workspace add-on's UI appears.\nGmail and Editor add-ons can also define sidebars.\n\n### Smart chip\n\nA smart chip is a mention of a person, file, calendar event, or other entity\nwithin a Google Workspace application. When users hover over a chip, they can also\npreview additional content about the file or link. For example, when users hover\nover a chip to a Google Slides presentation, they see a screenshot of a slide,\nthe owner of the presentation, and whether they've viewed the presentation\nbefore.\n\nYou can configure your add-on to use smart chips to preview links for a\nthird-party or non-Google service. See\n[Preview links in Google Docs](/workspace/add-ons/editors/gsao/preview-links).\n\n### Trigger\n\nA condition and automatic event response defined by an Apps Script project or\nadd-on. Triggers fire when their associated event occurs (for example, when an\nadd-on is opened) and cause a specified Apps Script function (the trigger\nfunction) to execute automatically. For\nGoogle Workspace add-ons, trigger functions often\nbuild new Cards in order to control what part of the add-on UI is displayed.\nOnly certain event types can have triggers.\n\nSee [add-on triggers](/workspace/add-ons/concepts/workspace-triggers) for more\ninformation.\n\n### Trigger function\n\nAn Apps Script function in a project that executes in response to a trigger\nbeing fired.\n\n### Widget\n\nA UI element such as a button, text field, or checkbox. Cards are constructed\nfrom a sequence of widget objects, defined by the Apps Script built-in\n[Card service](/apps-script/reference/card-service/card-service).\n\nSee [Widgets](/workspace/add-ons/concepts/widgets) for more information.\n\n### Widget handler function\n\nA function that links a particular [widget](/workspace/add-ons/concepts/widgets)\nto a particular [action object](/workspace/add-ons/concepts/actions). Each widget\ntype has a set of defined widget handler functions it can use to connect to\nactions. Widget hander functions define what kind of user interaction triggers\nthe resulting action, and are a crucial component of widget interactivity.\n\nSee [Widget handler functions](/workspace/add-ons/concepts/actions#widget_handler_functions)\nfor more information."]]