This article provides the steps to embed and display an attachment inside an article. This is done with the help of HTML iframes, the Google Document Viewer, and the URL of the attachment.
- It is necessary to enable the option to Allow potentially unsafe HTML in Help Center articles:
- In the Admin console, click Security policies.
- Place a checkmark to enable Allow potentially unsafe HTML in Help Center articles (as seen in the screenshot below):
- Create or open an existing article in your Help Center and attach a document (in this example we attach a PDF document).
- Save the article. The URL of the attachment is now visible (see screenshot below):
- Copy the URL.
- Edit the article and click the Code View button in the toolbar.
- In the code view, insert the following code where you would like to position your iframe (replacing ATTACHMENTURL with the URL of your attachment copied in step 4):
- Save the article. The embedded document is now displayed in the article (see the example below:):
Note: The URL provided does not follow a common folder location for the attachment. This URL is an API call that streams the file and is accessible by anyone on the internet. This is the standard technique used to embed attachments on websites.