3rd Party Hosting Webflow Sites & Files

In-Directly Embedding Content from Google Docs

Overview
What Does Webflow's Hosting Provide?
001
Hosting Sites
Hosting Sites
200
Exporting a Site
201
Reverse Proxy
202
Hosting Files
Hosting Files
600
Hosting Files on Google Drive
601
Hosting Files in Dropbox
602
Hosting Code
Hosting Client-side JavaScript Code
700
Hosting Editable Content & Data
Hosting Editable Content & Data
800
Hosting Data Using Google Sheets
801
Google Docs
Hosting Data Using Google Docs
850
In-Directly Embedding Content from Google Docs
851
Directly Embedding Formatted Content from Google Docs
852
Hosting on CDNs
Hosting Code on CDN
900
Dev & Build Process
901
No items found.
Published
May 25, 2023
Updated
May 25, 2023
in lightbox

IFRAME embedding is simple, but gives you limited control over presentation, and the document appears in a box on your page.

Supported Formats

Conveniently, you have a wide range of formats you can choose from in that IFRAME presentation.

Presentation-oriented formats;

  • docx: Word format
  • odt: OpenDocument Text format
  • pdf: Portable Document Format
  • html: HTML format
  • epub: EPUB format

Data-oriented formats;

  • rtf: Rich Text Format
  • txt: Plain text format

Integrating it into your Site

There are different ways to integrate this content;

  • Download the Document. If you simply want users to be able to download the current content, you can provide them a download link to the format you want.
  • IFRAME Embed. If you want to display the actual document content in your page, exactly as it appears in Google Docs, you can use an IFRAME to embed it.
  • Direct JavaScript Embedding. You can also use JavaScript with the data-oriented formats to retrieve the content, parse it, and then integrate that content into your webpage.

Creating the Link

IMPORTANT: Make certain your document is available to the people who need to see it. If you want it public on your website, share it with the "anyone with the link can view it" setting.

Open your doc in Google Docs to see the file ID in the URL. For example here's a Google Doc link;

https://docs.google.com/document/d/12qzAbwgcwjQbtWPgkgOGPDFqKj4HQpm4HmxRxRtej-Y/edit

Try it

The file ID is 12qzAbwgcwjQbtWPgkgOGPDFqKj4HQpm4HmxRxRtej-Y.

You'll use that to create the URLs you need.

Download links

If you want to force the browser to download the file, use the /export version of the link. It will specify the file type you want to download, e.g. to download it as a Microsoft Word .docx;

https://docs.google.com/document/d/12qzAbwgcwjQbtWPgkgOGPDFqKj4HQpm4HmxRxRtej-Y/export?format=docx

Try it

Set the format= to the format you want;

Presentation-oriented formats;

  • docx: Word format
  • odt: OpenDocument Text format
  • pdf: Portable Document Format
  • html: HTML format
  • epub: EPUB format

Data-oriented formats;

  • rtf: Rich Text Format
  • txt: Plain text format

Previewing

If you want to display the document neatly, without the editor controls, you can use the /preview mode instead;

https://docs.google.com/document/d/12qzAbwgcwjQbtWPgkgOGPDFqKj4HQpm4HmxRxRtej-Y/preview

This works especially well with IFRAMES;

In-Document Linking & Bookmarks

Google Docs does not have a rigid concept of pages so unlike a PDF, you cannot specify the page you want to navigate to.

However it does support bookmarks, which can be directly referenced in the URL through a fragment like #bookmark=id.w55jcj8heq8x. You can add that bookmark ID to your /edit or /preview URLs.

For example;

https://docs.google.com/document/d/12qzAbwgcwjQbtWPgkgOGPDFqKj4HQpm4HmxRxRtej-Y/preview#bookmark=id.w55jcj8heq8x

Try it

A bookmark in Google Docs allows you to create a link to a specific spot in a Google Docs text.

  1. In your Google Docs document, click where you want the link to direct to.
  2. Click "Insert" from the top menu, then click "Bookmark".
  3. You'll see a blue bookmark ribbon icon appear in the document at the cursor's location.
  4. Hover over the bookmark, and you'll see "Link" appear. Click on it to get a URL.

You can share this URL with anyone. When they click on it, they'll be taken directly to this location in the document.

Bookmarks link to a specific location in the text, not to a specific page. In Google Docs, the concept of a "page" can change based on the size of the user's browser window, the zoom level, and the display settings. Therefore, the bookmark may not appear on the same "page" for everyone.

  • Add that bookmark ID to your /edit or /preview URLs


Videos
No items found.
Table of Contents
Comments
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.