Skip to content

Commit 645423a

Browse files
authored
Standardize XML element formatting (#5304)
1 parent f6bdfd4 commit 645423a

File tree

64 files changed

+284
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+284
-284
lines changed

docs/concepts/browsers-used-by-office-web-add-ins.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Browsers and webview controls used by Office Add-ins
33
description: Specifies how the operating system and Office version determine what webview is used by Office Add-ins.
44
ms.topic: concept-article
@@ -79,7 +79,7 @@ To determine whether Office 2016 or Office 2019 is retail or volume-licensed, us
7979

8080
<sup>2</sup> When you use either EdgeHTML or WebView2, the Windows Narrator (sometimes called a "screen reader") reads the `<title>` tag in the page that opens in the task pane. In Trident+, the Narrator reads the title bar of the task pane, which comes from the add-in name that's specified in the add-in's manifest.
8181

82-
<sup>3</sup> If your add-in uses an add-in only manifest and includes the **\<Runtimes\>** element in the manifest or it uses the unified manifest and it includes an "extensions.runtimes.lifetime" property, then it won't use EdgeHTML. If the conditions for using WebView2 are met, then the add-in uses WebView2. Otherwise, it uses Trident+. For more information, see [Runtimes](/javascript/api/manifest/runtimes) and [Activate add-ins with events](../develop/event-based-activation.md).
82+
<sup>3</sup> If your add-in uses an add-in only manifest and includes the `<Runtimes>` element in the manifest or it uses the unified manifest and it includes an "extensions.runtimes.lifetime" property, then it won't use EdgeHTML. If the conditions for using WebView2 are met, then the add-in uses WebView2. Otherwise, it uses Trident+. For more information, see [Runtimes](/javascript/api/manifest/runtimes) and [Activate add-ins with events](../develop/event-based-activation.md).
8383

8484
### Microsoft 365 subscription versions of Office on Windows
8585

@@ -100,7 +100,7 @@ For subscription Office on Windows, the browser that's used is determined by the
100100

101101
<sup>3</sup> When you use either EdgeHTML or WebView2, the Windows Narrator (sometimes called a "screen reader") reads the `<title>` tag in the page that opens in the task pane. In Trident+, the Narrator reads the title bar of the task pane, which comes from the add-in name that's specified in the add-in's manifest.
102102

103-
<sup>4</sup> If your add-in uses an add-in only manifest and includes the **\<Runtimes\>** element in the manifest or it uses the unified manifest and it includes an "extensions.runtimes.lifetime" property, then it won't use EdgeHTML. If the conditions for using WebView2 are met, then the add-in uses WebView2. Otherwise, it uses Trident+. For more information, see [Runtimes](/javascript/api/manifest/runtimes) and [Activate add-ins with events](../develop/event-based-activation.md).
103+
<sup>4</sup> If your add-in uses an add-in only manifest and includes the `<Runtimes>` element in the manifest or it uses the unified manifest and it includes an "extensions.runtimes.lifetime" property, then it won't use EdgeHTML. If the conditions for using WebView2 are met, then the add-in uses WebView2. Otherwise, it uses Trident+. For more information, see [Runtimes](/javascript/api/manifest/runtimes) and [Activate add-ins with events](../develop/event-based-activation.md).
104104

105105
## Working with Trident+ (Internet Explorer 11)
106106

docs/concepts/duplicate-legacy-metaos-add-ins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Manage both a unified manifest and an add-in only manifest version of your Office Add-in
33
description: Learn when and how to maintain versions of your add-in for each type of manifest.
44
ms.topic: best-practice
@@ -102,7 +102,7 @@ The critical requirement for making two versions available is to be sure that th
102102

103103
- Give the new version a different name from the existing add-in.
104104
- Create and use different icons for the new version.
105-
- Be sure that the [`"id"`](/microsoft-365/extensibility/schema/root#id) property of the unified manifest in the new version is a different GUID from the **\<Id\>** element in the add-in only manifest of the existing add-in.
105+
- Be sure that the [`"id"`](/microsoft-365/extensibility/schema/root#id) property of the unified manifest in the new version is a different GUID from the `<Id>` element in the add-in only manifest of the existing add-in.
106106

107107
> [!NOTE]
108108
> If you use the same name and icon, the old and new solutions appear indistinguishable in the Outlook UI for add-in installation.

docs/concepts/privacy-and-security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Privacy and security for Office Add-ins
33
description: Learn about the privacy and security aspects of the Office Add-ins platform.
44
ms.date: 07/24/2025
@@ -301,7 +301,7 @@ Developers should also take note of the following security practices.
301301
302302
- Developers shouldn't use ActiveX controls in Office Add-ins as ActiveX controls don't support the cross-platform nature of the add-in platform.
303303
304-
- Content and task pane add-ins assume the same SSL settings that the browser uses by default, and allows most content to be delivered only by SSL. Outlook add-ins require all content to be delivered by SSL. Developers must specify in the **\<SourceLocation\>** element of the add-in manifest a URL that uses HTTPS, to identify the location of the HTML file for the add-in.
304+
- Content and task pane add-ins assume the same SSL settings that the browser uses by default, and allows most content to be delivered only by SSL. Outlook add-ins require all content to be delivered by SSL. Developers must specify in the `<SourceLocation>` element of the add-in manifest a URL that uses HTTPS, to identify the location of the HTML file for the add-in.
305305
306306
To make sure add-ins aren't delivering content by using HTTP, when testing add-ins, developers should make sure the following settings are selected in **Internet Options** in **Control Panel** and no security warnings appear in their test scenarios.
307307

docs/design/built-in-button-integration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Integrate built-in Office buttons into custom control groups and tabs
33
description: Learn how to include built-in Office buttons in your custom command groups and tabs on the Office ribbon.
44
ms.date: 06/10/2025
@@ -100,7 +100,7 @@ The following example adds the Office Superscript control to a custom group.
100100

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

103-
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).
103+
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).
104104

105105
The following markup example adds the Office Paragraph control group to a custom tab and positions it to appear just after a custom group.
106106

@@ -118,7 +118,7 @@ The following markup example adds the Office Paragraph control group to a custom
118118

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

121-
To insert a built-in Office control into a custom group, add an [OfficeControl](/javascript/api/manifest/group#officecontrol) element as a child element in the parent **\<Group\>** element. The `id` attribute of the **\<OfficeControl\>** element is 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).
121+
To insert a built-in Office control into a custom group, add an [OfficeControl](/javascript/api/manifest/group#officecontrol) element as a child element in the parent `<Group>` element. The `id` attribute of the `<OfficeControl>` element is 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).
122122

123123
The following markup example adds the Office Superscript control to a custom group and positions it to appear just after a custom button.
124124

docs/design/contextual-tabs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Create custom contextual tabs in Office Add-ins
33
description: Learn how to add custom contextual tabs to your Office Add-in.
44
ms.date: 06/30/2025
@@ -221,7 +221,7 @@ We'll construct an example of a contextual tabs JSON blob step-by-step. The full
221221

222222
- Both the properties are required.
223223
- The `size` property unit of measure is pixels. Icons are always square, so the number is both the height and the width.
224-
- The `sourceLocation` property specifies the full URL to the icon. Its value must match the URL specified in the **\<Image\>** element of the **\<Resources\>** section of your manifest (see [Specify the icons for your contextual tab](#specify-the-icons-for-your-contextual-tab)).
224+
- The `sourceLocation` property specifies the full URL to the icon. Its value must match the URL specified in the `<Image>` element of the `<Resources>` section of your manifest (see [Specify the icons for your contextual tab](#specify-the-icons-for-your-contextual-tab)).
225225

226226
> [!IMPORTANT]
227227
> Just as you typically must change the URLs in the add-in's manifest when you move from development to production, you must also change the URLs in your contextual tabs JSON.
@@ -720,7 +720,7 @@ When a parent menu control is marked with `"overriddenByRibbonApi": true`, then
720720
721721
# [Add-in only manifest](#tab/xmlmanifest)
722722

723-
Begin by defining a custom core tab (that is, *noncontextual* custom tab) in the manifest that duplicates the ribbon customizations of the custom contextual tabs in your add-in. But add an [OverriddenByRibbonApi](/javascript/api/manifest/overriddenbyribbonapi) element as the first child element of the duplicate [Group](/javascript/api/manifest/group), [Control](/javascript/api/manifest/control), and menu **\<Item\>** elements on the custom core tabs. The effect of doing so is the following:
723+
Begin by defining a custom core tab (that is, *noncontextual* custom tab) in the manifest that duplicates the ribbon customizations of the custom contextual tabs in your add-in. But add an [OverriddenByRibbonApi](/javascript/api/manifest/overriddenbyribbonapi) element as the first child element of the duplicate [Group](/javascript/api/manifest/group), [Control](/javascript/api/manifest/control), and menu `<Item>` elements on the custom core tabs. The effect of doing so is the following:
724724

725725
- If the add-in runs on an application and platform that support custom contextual tabs, then the custom core groups and controls won't appear on the ribbon. Instead, the custom contextual tab will be created when the add-in calls the `requestCreateControls` method.
726726
- If the add-in runs on an application or platform that *doesn't* support `requestCreateControls`, then the elements do appear on the custom core tab.
@@ -751,10 +751,10 @@ The following is an example. Note that "MyButton" will appear on the custom core
751751

752752
For more examples, see [OverriddenByRibbonApi](/javascript/api/manifest/overriddenbyribbonapi).
753753

754-
When a parent group, or menu is marked with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`, then it isn't visible, and all of its child markup is ignored when custom contextual tabs aren't supported. So, it doesn't matter if any of those child elements have the **\<OverriddenByRibbonApi\>** element or what its value is. The implication of this is that if a menu item or control must be visible in all contexts, then not only should it not be marked with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`, but *its ancestor menu and group must also not be marked this way*.
754+
When a parent group, or menu is marked with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`, then it isn't visible, and all of its child markup is ignored when custom contextual tabs aren't supported. So, it doesn't matter if any of those child elements have the `<OverriddenByRibbonApi>` element or what its value is. The implication of this is that if a menu item or control must be visible in all contexts, then not only should it not be marked with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`, but *its ancestor menu and group must also not be marked this way*.
755755

756756
> [!IMPORTANT]
757-
> Don't mark *all* of the child elements of a group or menu with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`. This is pointless if the parent element is marked with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>` for reasons given in the preceding paragraph. Moreover, if you leave out the **\<OverriddenByRibbonApi\>** on the parent (or set it to `false`), then the parent will appear regardless of whether custom contextual tabs are supported, but it will be empty when they are supported. So, if all the child elements shouldn't appear when custom contextual tabs are supported, mark the parent with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`.
757+
> Don't mark *all* of the child elements of a group or menu with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`. This is pointless if the parent element is marked with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>` for reasons given in the preceding paragraph. Moreover, if you leave out the `<OverriddenByRibbonApi>` on the parent (or set it to `false`), then the parent will appear regardless of whether custom contextual tabs are supported, but it will be empty when they are supported. So, if all the child elements shouldn't appear when custom contextual tabs are supported, mark the parent with `<OverriddenByRibbonApi>true</OverriddenByRibbonApi>`.
758758
759759
---
760760

docs/design/custom-tab-placement.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Position a custom tab on the ribbon
33
description: Learn how to control where a custom tab appears on the Office ribbon and whether it has focus by default.
44
ms.date: 02/12/2025
@@ -58,7 +58,7 @@ In the following example, the custom tab is configured to appear *just after* th
5858

5959
To position your custom tab, include either an [InsertBefore](/javascript/api/manifest/customtab#insertbefore) (left) or an [InsertAfter](/javascript/api/manifest/customtab#insertafter) (right) element in the [CustomTab](/javascript/api/manifest/customtab) element of your add-in's manifest. (You cannot have both elements.)
6060

61-
In the following example, the custom tab is configured to appear *just after* the **Review** tab. Note that the value of the **\<InsertAfter\>** element is the ID of the built-in Office tab. See [Find the IDs of built-in Office ribbon tabs](../develop/built-in-ui-ids.md).
61+
In the following example, the custom tab is configured to appear *just after* the **Review** tab. Note that the value of the `<InsertAfter>` element is the ID of the built-in Office tab. See [Find the IDs of built-in Office ribbon tabs](../develop/built-in-ui-ids.md).
6262

6363
```xml
6464
<ExtensionPoint xsi:type="ContosoRibbonTab">

docs/design/disable-add-in-commands.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Enable and Disable Add-in Commands
33
description: Learn how to change the enabled or disabled status of custom ribbon buttons and menu items in your Office Web Add-in.
44
ms.date: 03/11/2025
@@ -93,7 +93,7 @@ Just add an [`"enabled"`](/microsoft-365/extensibility/schema/extension-common-c
9393

9494
Just add an [Enabled](/javascript/api/manifest/enabled) element immediately *below* (not inside) the [Action](/javascript/api/manifest/action) element of the control item. Then, set its value to `false`.
9595

96-
The following shows the basic structure of a manifest that configures the **\<Enabled\>** element.
96+
The following shows the basic structure of a manifest that configures the `<Enabled>` element.
9797

9898
```xml
9999
<OfficeApp ...>
@@ -213,7 +213,7 @@ await Office.contextMenu.requestUpdate({
213213

214214
A common scenario in which the state of a ribbon or context menu control should change is when a user-initiated event changes the add-in context. Consider a scenario in which a button should be available when, and only when, a chart is activated. Although the following example uses ribbon controls, a similar implementation can be applied to custom items on a context menu.
215215

216-
1. First, set the **\<Enabled\>** element for the button in the manifest to `false`. For guidance on how to configure this, see [Deactivate ribbon controls at launch](#deactivate-ribbon-controls-at-launch).
216+
1. First, set the `<Enabled>` element for the button in the manifest to `false`. For guidance on how to configure this, see [Deactivate ribbon controls at launch](#deactivate-ribbon-controls-at-launch).
217217
1. Then, assign handlers. This is commonly done in the **Office.onReady** function as in the following example. In the example, handlers (created in a later step) are assigned to the **onActivated** and **onDeactivated** events of all the charts in an Excel worksheet.
218218

219219
```javascript

docs/design/keyboard-shortcuts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Custom keyboard shortcuts in Office Add-ins
33
description: Learn how to add custom keyboard shortcuts, also known as key combinations, to your Office Add-in.
44
ms.date: 03/12/2025
@@ -185,7 +185,7 @@ If your add-in uses an add-in only manifest, custom keyboard shortcuts are defin
185185
### Link the mapping file to the manifest
186186

187187
1. In your add-in project, open the **manifest.xml** file.
188-
1. Immediately *below* (not inside) the **\<VersionOverrides\>** element in the manifest, add an [ExtendedOverrides](/javascript/api/manifest/extendedoverrides) element. Set the `Url` attribute to the full URL of the JSON file you created in a previous step.
188+
1. Immediately *below* (not inside) the `<VersionOverrides>` element in the manifest, add an [ExtendedOverrides](/javascript/api/manifest/extendedoverrides) element. Set the `Url` attribute to the full URL of the JSON file you created in a previous step.
189189

190190
```xml
191191
...
@@ -198,7 +198,7 @@ If your add-in uses an add-in only manifest, custom keyboard shortcuts are defin
198198

199199
## Map custom actions to their functions
200200

201-
1. In your project, open the JavaScript file loaded by your HTML page in the **\<FunctionFile\>** element.
201+
1. In your project, open the JavaScript file loaded by your HTML page in the `<FunctionFile>` element.
202202
1. In the JavaScript file, use the [Office.actions.associate](/javascript/api/office/office.actions#office-office-actions-associate-member) API to map each action you specified in an earlier step to a JavaScript function. Add the following JavaScript to the file. Note the following about the code.
203203
- The first parameter is the name of an action that you mapped to a keyboard shortcut. The location of the name of the action depends on the type of manifest your add-in uses.
204204
- **Unified app manifest for Microsoft 365**: The value of the `"extensions.keyboardShortcuts.shortcuts.actionId"` property in the **manifest.json** file.

docs/develop/authorize-to-microsoft-graph.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Authorize to Microsoft Graph with SSO
33
description: Learn how users of an Office Add-in can use single sign-on (SSO) to fetch data from Microsoft Graph.
44
ms.date: 06/24/2025
@@ -13,7 +13,7 @@ Users sign in to Office using either their personal Microsoft account or their M
1313

1414
In addition to hosting the pages and JavaScript of the web application, the add-in must also host, at the same [fully qualified domain name](/windows/desktop/DNS/f-gly#_dns_fully_qualified_domain_name_fqdn__gly), one or more web APIs that will get an access token to Microsoft Graph and make requests to it.
1515

16-
The add-in manifest contains a **\<WebApplicationInfo\>** element that provides important Azure app registration information to Office, including the permissions to Microsoft Graph that the add-in requires.
16+
The add-in manifest contains a `<WebApplicationInfo>` element that provides important Azure app registration information to Office, including the permissions to Microsoft Graph that the add-in requires.
1717

1818
### How it works at runtime
1919

0 commit comments

Comments
 (0)