Skip to content

Commit 0077ae3

Browse files
authored
Merge pull request #187124 from dlepow/devportal
[APIM] Developer portal HTML injection
2 parents 950bdf2 + c4ab854 commit 0077ae3

File tree

5 files changed

+50
-13
lines changed

5 files changed

+50
-13
lines changed

articles/api-management/api-management-howto-developer-portal-customize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ To make your portal and its latest changes available to visitors, you need to *p
175175
### Publish from the administrative interface
176176

177177
1. Make sure you saved your changes by selecting the **Save** icon.
178-
1. In the **Operations** section of the menu, select **Publish website** . This operation may take a few minutes.
178+
1. In the **Operations** section of the menu, select **Publish website**. This operation may take a few minutes.
179179

180180
:::image type="content" source="media/api-management-howto-developer-portal-customize/publish-portal.png" alt-text="Publish portal" border="false":::
181181

articles/api-management/api-management-howto-developer-portal.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: dlepow
88

99
ms.service: api-management
1010
ms.topic: article
11-
ms.date: 04/15/2021
11+
ms.date: 02/02/2022
1212
ms.author: danlep
1313
ms.custom: devx-track-azurepowershell
1414
---
@@ -30,15 +30,23 @@ As introduced in this article, you can customize and extend the developer portal
3030
3131
Migration to the new developer portal is described in the [dedicated documentation article](developer-portal-deprecated-migration.md).
3232

33-
## Customization and styling
33+
## Customization and styling of the managed portal
3434

35-
The developer portal can be customized and styled through the built-in, drag-and-drop visual editor. See [this tutorial](api-management-howto-developer-portal-customize.md) for more details.
35+
Your API Management service includes a built-in, always up-to-date, **managed** developer portal. You can access it from the Azure portal interface.
3636

37-
## <a name="managed-vs-self-hosted"></a> Extensibility
37+
Customize and style the managed portal through the built-in, drag-and-drop visual editor:
3838

39-
Your API Management service includes a built-in, always up-to-date, **managed** developer portal. You can access it from the Azure portal interface.
39+
* Use the visual editor to modify pages, media, layouts, menus, styles, or website settings.
40+
41+
* Take advantage of built-in widgets to add text, images, buttons, and other objects that the portal supports out-of-the-box.
42+
43+
* [Add custom HTML](developer-portal-faq.md#how-do-i-add-custom-html-to-my-developer-portal) - for example, add HTML for a form or to embed a video player. The custom code is rendered in an inline frame (iframe).
44+
45+
See [this tutorial](api-management-howto-developer-portal-customize.md) for example customizations.
46+
47+
## <a name="managed-vs-self-hosted"></a> Extensibility
4048

41-
If you need to extend it with custom logic, which isn't supported out-of-the-box, you can modify its codebase. The portal's codebase is [available in a GitHub repository](https://github.com/Azure/api-management-developer-portal). For example, you could implement a new widget, which integrates with a third-party support system. When you implement new functionality, you can choose one of the following options:
49+
In some cases you might need functionality beyond the customization and styling options supported in the managed developer portal. If you need to implement custom logic, which isn't supported out-of-the-box, you can modify the portal's codebase, available on [GitHub](https://github.com/Azure/api-management-developer-portal). For example, you could create a new widget to integrate with a third-party support system. When you implement new functionality, you can choose one of the following options:
4250

4351
- **Self-host** the resulting portal outside of your API Management service. When you self-host the portal, you become its maintainer and you are responsible for its upgrades. Azure Support's assistance is limited only to the [basic setup of self-hosted portals](developer-portal-self-host.md).
4452
- Open a pull request for the API Management team to merge new functionality to the **managed** portal's codebase.
@@ -48,7 +56,7 @@ For extensibility details and instructions, refer to the [GitHub repository](htt
4856

4957
## Next steps
5058

51-
Learn more about the new developer portal:
59+
Learn more about the developer portal:
5260

5361
- [Access and customize the managed developer portal](api-management-howto-developer-portal-customize.md)
5462
- [Set up self-hosted version of the portal](developer-portal-self-host.md)

articles/api-management/developer-portal-faq.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: dlepow
88

99
ms.service: api-management
1010
ms.topic: troubleshooting
11-
ms.date: 07/30/2021
11+
ms.date: 02/04/2022
1212
ms.author: danlep
1313
ms.custom: devx-track-azurepowershell
1414
---
@@ -17,8 +17,15 @@ ms.custom: devx-track-azurepowershell
1717

1818
## What if I need functionality that isn't supported in the portal?
1919

20-
You can open a feature request in the [GitHub repository](https://github.com/Azure/api-management-developer-portal) or [implement the missing functionality yourself](developer-portal-implement-widgets.md). Learn more about developer portal [extensibility](api-management-howto-developer-portal.md#managed-vs-self-hosted).
20+
You have the following options:
2121

22+
* For certain situations, you can [add custom HTML](#how-do-i-add-custom-html-to-my-developer-portal) to add functionality to the portal.
23+
24+
* Open a feature request in the [GitHub repository](https://github.com/Azure/api-management-developer-portal).
25+
26+
* [Implement the missing functionality yourself](developer-portal-implement-widgets.md).
27+
28+
Learn more about developer portal [extensibility](api-management-howto-developer-portal.md#managed-vs-self-hosted).
2229

2330
## Can I have multiple developer portals in one API Management service?
2431

@@ -68,7 +75,7 @@ You can check the status of the CORS policy in the **Portal overview** section o
6875
6976
![Screenshot that shows where you can check the status of your CORS policy.](media/developer-portal-faq/cors-azure-portal.png)
7077

71-
Automatically apply the CORS policy by clicking on the **Enable CORS** button.
78+
Automatically apply the CORS policy by clicking the **Enable CORS** button.
7279

7380
You can also enable CORS manually.
7481

@@ -127,7 +134,7 @@ This error is shown when a `GET` call to `https://<management-endpoint-hostname>
127134

128135
If your API Management service is in a VNet, refer to the [VNet connectivity question](#do-i-need-to-enable-additional-vnet-connectivity-for-the-managed-portal-dependencies).
129136

130-
The call failure may also be caused by an TLS/SSL certificate, which is assigned to a custom domain and is not trusted by the browser. As a mitigation, you can remove the management endpoint custom domain API Management will fall back to the default endpoint with a trusted certificate.
137+
The call failure may also be caused by an TLS/SSL certificate, which is assigned to a custom domain and is not trusted by the browser. As a mitigation, you can remove the management endpoint custom domain. API Management will fall back to the default endpoint with a trusted certificate.
131138

132139
## What's the browser support for the portal?
133140

@@ -189,10 +196,32 @@ You can generate *user-specific tokens* (including admin tokens) using the [Get
189196
> [!NOTE]
190197
> The token must be URL-encoded.
191198
199+
## How do I add custom HTML to my developer portal?
200+
201+
The managed developer portal includes a **Custom HTML code** widget that enables you to insert HTML code for small portal customizations. For example, use custom HTML to embed a video or to add a form. The portal renders the custom widget in an inline frame (iframe).
202+
203+
1. In the administrative interface for the developer portal, go to the page or section where you want to insert the widget.
204+
1. Select the grey "plus" (**+**) icon that appears when you hover the pointer over the page.
205+
1. In the **Add widget** window, select **Custom HTML code**.
206+
207+
:::image type="content" source="media/developer-portal-faq/add-custom-html-code-widget.png" alt-text="Add widget for custom HTML code":::
208+
1. Select the "pencil" icon to customize the widget.
209+
1. Enter a **Width** and **Height** (in pixels) for the widget.
210+
1. To inherit styles from the developer portal (recommended), select **Apply developer portal styling**.
211+
> [!NOTE]
212+
> If this setting isn't selected, the embedded elements will be plain HTML controls, without the styles of the developer portal.
213+
214+
:::image type="content" source="media/developer-portal-faq/configure-html-custom-code.png" alt-text="Configure HTML custom code":::
215+
1. Replace the sample **HTML code** with your custom content.
216+
1. When configuration is complete, close the window.
217+
1. Save your changes, and [republish the portal](api-management-howto-developer-portal-customize.md#publish).
218+
219+
> [!NOTE]
220+
> Microsoft does not support the HTML code you add in the Custom HTML Code widget.
192221
193222
## Next steps
194223

195-
Learn more about the new developer portal:
224+
Learn more about the developer portal:
196225

197226
- [Access and customize the managed developer portal](api-management-howto-developer-portal-customize.md)
198227
- [Set up self-hosted version of the portal](developer-portal-self-host.md)
23.1 KB
Loading
54.4 KB
Loading

0 commit comments

Comments
 (0)