Embed external content in AODocs (iframes, images, and HTML)
This article explains how to embed external content — such as Google documents, YouTube videos, Awesome Table views, or Power BI reports — into your AODocs library homepage and document descriptions.
Embedding content using iframes lets you display dynamic information that automatically updates when the source content changes.
For security reasons, AODocs sanitizes all HTML content when you save. Unsupported tags, attributes, or iframe sources are silently removed — you won't see an error message, but the content will be gone after saving.
Important: The library homepage and document description use different sanitization rules. Content that works in one location may not work in the other.
Automatically generated table of contents
Where can you embed external content in AODocs?
You can embed external content in:
- your AODocs library homepage
- your document page description
What can you embed, and where?
The following table shows which iframe sources are allowed in each location:
| Embed source | Library homepage | Document description |
|---|---|---|
| YouTube videos | Allowed | Allowed |
| Published Google Docs, Sheets, Slides, Drawings, Forms | Allowed | Stripped on save |
| Google Drive file previews (Office, PDF, images, videos) | Allowed | Stripped on save |
| Google Looker Studio (formerly Data Studio) | Allowed | Stripped on save |
| Google Calendar | Allowed | Stripped on save |
| Awesome Table views | Allowed | Stripped on save |
| Power BI reports | Allowed | Stripped on save |
| Any other iframe source (e.g., external websites) | Stripped on save | Stripped on save |
Key takeaway: Document descriptions only support YouTube embeds. If you need to embed Google Docs, Looker Studio, Awesome Table, or other sources, use the library homepage instead.
Before you start
Before you embed content in AODocs, you must obtain the embeddable HTML code from the external source. The embed code is usually an <iframe> tag with a src URL.
Refer to the following resources to get the embed code:
- Google Docs, Sheets, Slides, Drawings, and Forms — publish your document first, then copy the embed code
- Looker Studio (formerly Data Studio)
- Google Calendar
- Awesome Table
- YouTube
- Power BI reports
Accepted iframe URL formats and examples
Even for allowed sources, the iframe src URL must match a specific pattern. Below are the exact formats accepted, with working examples.
YouTube
Works in both library homepage and document description.
<iframe src="https://www.youtube.com/embed/VIDEO_ID" width="560" height="315" frameborder="0" allowfullscreen></iframe>
Will NOT work:
-
https://www.youtube.com/watch?v=VIDEO_ID— use the/embed/URL, not the/watchURL -
https://youtu.be/VIDEO_ID— shortened URLs are not accepted -
http://www.youtube.com/embed/VIDEO_ID— must behttps://
Published Google documents (Docs, Sheets, Slides, Drawings, Forms)
Library homepage only.
<iframe src="https://docs.google.com/document/d/e/PUBLISHED_ID/pub" width="100%" height="600"></iframe> <iframe src="https://docs.google.com/spreadsheets/d/e/PUBLISHED_ID/embed" width="100%" height="400"></iframe> <iframe src="https://docs.google.com/presentation/d/e/PUBLISHED_ID/embed" width="960" height="569"></iframe> <iframe src="https://docs.google.com/forms/d/e/PUBLISHED_ID/viewform" width="100%" height="600"></iframe>
Will NOT work:
-
https://docs.google.com/document/d/DOCUMENT_ID/edit— must use the published URL (with/d/e/PUBLISHED_ID/pub), not the edit URL - Documents in a Google Workspace domain use:
https://docs.google.com/a/YOUR_DOMAIN/document/d/e/...— this format is accepted
Google Drive file previews
Library homepage only.
<iframe src="https://drive.google.com/file/d/FILE_ID/preview" width="100%" height="480"></iframe>
Will NOT work:
-
https://drive.google.com/file/d/FILE_ID/view— must use/preview, not/view
Google Looker Studio (Data Studio)
Library homepage only.
<iframe src="https://lookerstudio.google.com/embed/reporting/REPORT_ID/page/PAGE_ID" width="100%" height="600" frameborder="0"></iframe>
The legacy domain datastudio.google.com is also accepted.
Google Calendar
Library homepage only.
<iframe src="https://calendar.google.com/calendar/embed?src=CALENDAR_ID" width="800" height="600" frameborder="0"></iframe>
Awesome Table
Library homepage only.
<iframe src="https://view-awesome-table.com/VIEW_ID/view" width="100%" height="600" style="border: none;"></iframe>
Will NOT work:
- Any Awesome Table URL that doesn't match the pattern
https://view-awesome-table.com/{id}/view - Awesome Table iframes in document descriptions — they are stripped on save
Power BI
Library homepage only.
<iframe src="https://app.powerbi.com/view?r=EMBED_TOKEN" width="100%" height="600" frameborder="0" allowfullscreen></iframe>
Allowed iframe attributes
Only the following attributes are kept on <iframe> tags. Any other attributes are removed.
| Attribute | Accepted values |
|---|---|
src |
Must match one of the allowed URL patterns above |
width |
Number or dimension (e.g., 560, 100%) |
height |
Number or dimension (e.g., 315, 600px) |
frameborder |
Number (e.g., 0) |
scrolling |
auto, yes, or no only |
allow |
Any value (e.g., autoplay; encrypted-media) |
allowfullscreen |
Any value |
marginheight |
Number |
marginwidth |
Number |
style |
Inline CSS (validated — see HTML and CSS section) |
Allowed and blocked HTML tags
Beyond iframes, AODocs validates all HTML content. The following sections describe what HTML tags and formatting are accepted.
Always allowed (both locations)
-
Text formatting:
<b>,<i>,<u>,<s>,<em>,<strong>,<small>,<big>,<sub>,<sup>,<strike>,<center> -
Headings:
<h1>through<h6> -
Paragraphs and blocks:
<p>,<div>,<span>,<blockquote>,<pre>,<code>,<cite> -
Line breaks and rules:
<br>,<hr> -
Lists:
<ul>,<ol>,<li> -
Tables:
<table>,<thead>,<tbody>,<tfoot>,<tr>,<td>,<th>,<col>,<colgroup> -
Links:
<a href="...">(must behttp://,https://,ftp://, ormailto:) -
Images:
<img src="...">(must be an HTTP/HTTPS URL — see images section) -
Font styling:
<font>withcolor,face, andsizeattributes -
Other:
<label>,<fieldset>,<legend>,<map>,<noscript>
Always blocked (both locations)
These tags are completely removed, including their content:
-
<script>— JavaScript is never allowed -
<object>,<param>— plugin embeds are not allowed -
<frameset>,<frame>,<noframes>— legacy frames -
<base>,<title>— page-level tags
Differences between library homepage and document description
| HTML tag | Library homepage | Document description |
|---|---|---|
<style> (CSS stylesheet blocks) |
Removed | Allowed |
<form> |
Tag removed, inner content kept | Allowed |
<button>, <input>, <select>, <option>, <textarea>
|
Removed | Allowed |
<link> (external stylesheets) |
Removed | Allowed (with type/rel restrictions) |
Note: The library homepage is stricter for HTML structure tags (no forms, no style blocks) but more permissive for iframe sources. The document description is the opposite: it allows more HTML tags but restricts iframe sources to YouTube only.
Images
You can insert images in both locations. Images can be:
- Pasted or dragged into the editor — they are automatically uploaded to AODocs servers and converted to a URL
-
Inserted via URL using the image button in the editor toolbar — the URL must be
http://orhttps://
Not supported: Base64-encoded images (data:image/png;base64,...) in the HTML source code. If you paste a data: URI directly into the source code, the image will be stripped on save. Always use the editor's built-in image insertion, which handles the upload automatically.
Inline CSS styles
Inline style attributes are allowed on most tags in both locations. The following CSS properties are accepted:
-
Colors:
color,background-color,background -
Box model:
margin,padding,border,width,height,max-width,min-height, etc. -
Text:
font-family,font-size,font-weight,font-style,text-align,text-decoration,line-height,letter-spacing,text-indent,text-transform,white-space -
Layout:
display,float,clear,position,top,left,right,bottom,overflow,vertical-align,visibility -
Table:
border-collapse,border-spacing,table-layout,caption-side,empty-cells -
List:
list-style,list-style-type,list-style-position,list-style-image -
Other:
cursor,outline,direction,unicode-bidi,word-spacing
Not supported: expression(), vendor-prefixed properties (e.g., -webkit-*, -moz-binding), and the IE-specific behavior property are stripped.
Tip: On the library homepage, <style> blocks are stripped. If you need CSS styling on the homepage, use inline style attributes on individual elements instead.
Event handler attributes
JavaScript event handler attributes are stripped from all tags in both locations. This includes:
-
onclick,onload,onerror,onmouseover,onfocus,onblur, and all otheron*attributes
How to embed content in your library homepage
Note: You must be a library administrator.
1. On your library homepage, access the Home tab.
2. Click the Edit description button.
3. In edit mode, open the Tools menu and select Source code.
4. Paste the embeddable HTML code at the location where you want it to appear in your welcome message.
5. Click Save.
Learn more: Customize your library homepage.
How to embed content in your document description
Note: You must have edit rights on the document. Remember that only YouTube embeds are supported in document descriptions — see the compatibility matrix above.
1. Open your document and click the Edit button.
2. In the Description section, open the Tools menu and select Source code.
3. Paste the embeddable HTML code at the location where you want it to appear in your document description.
4. Click Save.
Learn more:
- Create documents in Document Management libraries
- Create documents in Team Folders and Secured Folders
Troubleshooting: content disappears after saving
If your HTML content disappears after saving, it was removed by the server-side sanitizer. Common causes:
| Symptom | Cause | Solution |
|---|---|---|
| Iframe disappears from document description | Only YouTube embeds are allowed in document descriptions | Move the iframe to the library homepage instead, or use a YouTube embed |
| YouTube iframe disappears | Wrong URL format (e.g., /watch?v= instead of /embed/) |
Use the embed URL: https://www.youtube.com/embed/VIDEO_ID
|
| Google Doc iframe disappears from homepage | Using the edit URL instead of the published URL | Publish the document first (File > Share > Publish to web), then use the published embed URL |
| Image disappears after saving | Image was inserted as a base64 data: URI in the source code |
Use the editor's image button to upload, or provide an https:// URL |
<style> block disappears from homepage |
Style blocks are not allowed on the library homepage | Use inline style="..." attributes on individual elements instead |
| Form elements disappear from homepage | Form tags (<input>, <button>, etc.) are not allowed on the homepage |
Use the document description for form elements, or embed a Google Form via iframe on the homepage |
| Awesome Table / Looker Studio iframe disappears from document | These sources are only allowed on the library homepage | Move the iframe to the library homepage |