Embedding Google Docs

Google Docs is a popular service for managing documents online. As a faculty, staff or student at UCI you have access to UCI Google with unlimited storage. You can embed your Google Docs in your website or blog following the directions below.

Google provides an iFrame to embed your Google Docs. By default, WordPress will strip out iFrame code for security reasons. The iFrame code will disappear when switching between Visual and Text mode or when Publishing. To prevent this, you will need to change the provided iFrame code.

Embedding a Google Doc

Publishing the Google Doc to the Web

Before you embed your Google Doc, you will need to make it public. It if is private, only you will be able to see it.

  1. Edit the Google Doc you want to share.
  2. Click the Share button
    Share button
  3. Click the Advanced link in the Share overlay.
    Advanced link
  4. Click the Change link next to Private.
    Change Privacy
  5. Change it to either On – Public on the Web or On – Anyone with the link and click Save.
    Link sharing
  6. Go to File > Publish to the web…
    Publish to the web
  7. Click the Embed tab and copy the iframe code.
    iFrame code

Add iFrame

  1. Edit the page or post .
  2. Click the Text tab above the formatting toolbar.
    Text Tab
  3. Paste in the iFrame code you want to insert.
    iframe code
  4. Change the iFrame code to the iFrame shortcode.
    Change the “<” to “[” and change the “>” to “]” and remove the last “</iframe> code.
    iframe shortcode
  5. Preview or Publish your post or page. Your iFrame code should be inserted and the content displayed.

Sample Google Sheet

Sample Google Form