Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[All Hosts] (manifest) account for unified manifest in UX/UI articles #4757

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
8 changes: 7 additions & 1 deletion docs/design/add-in-icons-fresh.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Fresh style icon guidelines for Office Add-ins
description: Guidelines for using Fresh style icons in Office Add-ins.
ms.date: 08/18/2023
ms.date: 09/19/2024
ms.topic: best-practice
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -128,6 +128,12 @@ Office icons are designed to render well in high contrast modes. Foreground elem

## See also

### Unified manifest reference

- ["extensions.ribbons" array](/microsoftteams/platform/resources/schema/manifest-schema#extensionsribbons)

### Add-in only manifest reference

- [Icon manifest element](/javascript/api/manifest/icon)
- [IconUrl manifest element](/javascript/api/manifest/iconurl)
- [HighResolutionIconUrl manifest element](/javascript/api/manifest/highresolutioniconurl)
Expand Down
8 changes: 7 additions & 1 deletion docs/design/add-in-icons-monoline.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Monoline style icon guidelines for Office Add-ins
description: Guidelines for using Monoline style icons in Office Add-ins.
ms.date: 08/18/2023
ms.date: 09/19/2024
ms.topic: best-practice
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -205,6 +205,12 @@ The final icons should be saved as .png image files. Use PNG format with a trans

## See also

### Unified manifest reference

- ["extensions.ribbons" array](/microsoftteams/platform/resources/schema/manifest-schema#extensionsribbons)

### Add-in only manifest reference

- [Icon manifest element](/javascript/api/manifest/icon)
- [IconUrl manifest element](/javascript/api/manifest/iconurl)
- [HighResolutionIconUrl manifest element](/javascript/api/manifest/highresolutioniconurl)
Expand Down
88 changes: 86 additions & 2 deletions docs/design/built-in-button-integration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Integrate built-in Office buttons into custom control groups and tabs
description: Learn how to include built-in Office buttons in your custom command groups and tabs on the Office ribbon.
ms.date: 06/26/2024
ms.date: 09/19/2024
ms.topic: how-to
ms.localizationpriority: medium
---
Expand All @@ -17,6 +17,88 @@ You can insert built-in Office buttons into your custom control groups on the Of
> [!IMPORTANT]
> The add-in feature described in this article is only available in **PowerPoint** on the web, on Windows, and on Mac.

Open the tab for the type of manifest your add-in uses for the details of the manifest markup.

# [Unified manifest for Microsoft 365](#tab/jsonmanifest)

[!include[Unified manifest host application support note](../includes/unified-manifest-support-note.md)]

## Insert a built-in control group into a custom tab

To insert a built-in Office control group into a custom tab, add a group object with a "builtInGroupId" property *instead of an "id" property* to the "groups" array of your custom tab object. Set to the ID of the built-in group. See [Find the IDs of controls and control groups](#find-the-ids-of-controls-and-control-groups). *The built-in group object should have no other properties.*
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved

The following example adds the Office Paragraph control group to a custom tab.


```json
"extensions": [
...
{
...
"ribbons": [
...
{
...
"tabs": [
{
"id": "MyTab",
...
"groups": [
... // Optionally, other groups in the tab
{
"builtInGroupId": "Paragraph"
},
... // Optionally, other groups in the tab
]
}
]
}
]
}
]
```

## Insert a built-in control into a custom group

To insert a built-in Office control into a custom group, add a control object with a "builtInControlId" property *instead of an "id" property* to the "controls" array of your custom group object. Set to the ID of the built-in control. See [Find the IDs of controls and control groups](#find-the-ids-of-controls-and-control-groups). *The built-in control object should have no other properties.*
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved

The following example adds the Office Superscript control to a custom group.

```json
"extensions": [
...
{
...
"ribbons": [
...
{
...
"tabs": [
{
...
"groups": [
{
"id": "MyGroup",
...
"controls": [
... // Optionally, other controls in the group
{
"builtInControlId": "Superscript"
},
... // Optionally, other controls in the group
]
}
]
}
]
}
]
}
]
```

# [Add-in only manifest](#tab/xmlmanifest)

## Insert a built-in control group into a custom tab

To insert a built-in Office control group into a tab, add an [OfficeGroup](/javascript/api/manifest/customtab#officegroup) element as a child element in the parent **\<CustomTab\>** element. The `id` attribute of the of the **\<OfficeGroup\>** element is set to the ID of the built-in group. See [Find the IDs of controls and control groups](#find-the-ids-of-controls-and-control-groups).
Expand Down Expand Up @@ -62,6 +144,8 @@ The following markup example adds the Office Superscript control to a custom gro
</ExtensionPoint>
```

---

> [!NOTE]
> Users can customize the ribbon in the Office application. Any user customizations will override your manifest settings. For example, a user can remove a button from any group and remove any group from a tab.

Expand All @@ -71,4 +155,4 @@ The IDs for supported controls and control groups are in files in the repo [Offi

## Behavior on unsupported platforms

If your add-in is installed on a platform that doesn't support [requirement set AddinCommands 1.3](/javascript/api/requirement-sets/common/add-in-commands-requirement-sets), then the markup described in this article is ignored and the built-in Office controls/groups won't appear in your custom groups/tabs. To prevent your add-in from being installed on platforms that don't support the markup, add a reference to the requirement set in the **\<Requirements\>** section of the manifest. For instructions, see [Specify which Office versions and platforms can host your add-in](../develop/specify-office-hosts-and-api-requirements.md#specify-which-office-versions-and-platforms-can-host-your-add-in). Alternatively, design your add-in to have an experience when **AddinCommands 1.3** isn't supported, as described in [Design for alternate experiences](../develop/specify-office-hosts-and-api-requirements.md#design-for-alternate-experiences). For example, if your add-in contains instructions that assume the built-in buttons are in your custom groups, you could design a version that assumes that the built-in buttons are only in their usual places.
If your add-in is installed on a platform that doesn't support [requirement set AddinCommands 1.3](/javascript/api/requirement-sets/common/add-in-commands-requirement-sets), then the markup described in this article is ignored and the built-in Office controls/groups won't appear in your custom groups/tabs. To prevent your add-in from being installed on platforms that don't support the markup, you must specify **AddinCommands 1.3** in the manifest as a requirement for installation. For instructions, see [Specify which Office versions and platforms can host your add-in](../develop/specify-office-hosts-and-api-requirements.md#specify-which-office-versions-and-platforms-can-host-your-add-in). Alternatively, design your add-in to have an experience when **AddinCommands 1.3** isn't supported, as described in [Design for alternate experiences](../develop/specify-office-hosts-and-api-requirements.md#design-for-alternate-experiences). For example, if your add-in contains instructions that assume the built-in buttons are in your custom groups, you could design a version that assumes that the built-in buttons are only in their usual places.
Loading