Skip to main content

Embed Google Doc or OneDrive Documents

You can embed a Google Doc or OneDrive document by using a special type of link. You need to make your document available for embedding.

  1. The way to do this varies depending on the type of document:

    • For a Google Doc, select File > Publish to the web in your Google Doc. Next, copy the Link URL.

    • For Google Slides, select File > Publish to the web in your Google Slides. Next, copy the Embed link. You will need to edit this link before you use it in step 4. When editing, remove the frame information. For example, let's say your embed link looks like this:

      <iframe src="https://docs.google.com/presentation/d/e/long_string_of_characters/embed?start=false&loop=false&delayms=3000" frameborder="0" width="960" height="569" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>

      You should remove <iframe src=" at the start and everything after /embed, so that the link looks like this:

      https://docs.google.com/presentation/d/e/long_string_of_characters/embed
    • For OneDrive:

      1. Pick the file you want to embed by selecting the check box in the upper-right corner of the file.

      2. Select Embed at the top of the page, and then choose Generate.

      Note

      This feature is only suitable for documents and cannot be used for images.

  2. Insert a link element in your topic where you want to embed the document. It needs to be in a para, but the para should only contain that link.

    Tip

    You can add link text to make it easier to see what it links to, but that text will not be used in the output.

  3. Add a role attribute. For a Google Doc, set it to gdoc, and for a OneDrive document, set it to onedrive.

  4. Add an xlink:href attribute and set the value to the embed URL.

Note

  • The document will not be embedded in the topic inside the editor, it will only show that there is one embedded. The embedding itself happens when you publish.

  • Embedding is only available for HTML5 or Zendesk output. For other formats a regular link will be created.