-
Notifications
You must be signed in to change notification settings - Fork 10
Generating the shortcode
- First, you'll need to find the public URL of your Google Doc file. Follow this guide, then move on to step 2.
- Then, your shortcode should look like this:
[gdoc link="THE LINK YOU COPIED" height="800"]
- Next, you can either copy and paste the shortcode into the:
- Block Editor - by using the Shortcode block
- Classic Editor - You might need to put the shortcode on its own line.
You can also customize the shortcode by using some custom parameters mentioned below.
Follow the steps above, but change the shortcode to:
[gdoc link="THE LINK YOU COPIED" type="audio"]
Notice the type
is set to audio
.
When you embed an audio file, we will use the browser's native HTML5 audio player.
- Navigate to your Google Form
- Click on the Send button, followed by the Send via link icon.
- Next, click on the Copy button to copy the link.
You can also view this GIF:
Lastly, follow step 2 from the "Embedding most documents" section above.
Note: This is only needed in v0.4.
For every other file type (image, PDF, Microsoft Office, etc.), follow the steps above, but change the shortcode to:
[gdoc link="THE LINK YOU COPIED" type="other"]
Notice the type
is set to other
.
When you embed a miscellaneous file, we will use Google's preview embed viewer to display the file.
Here are some other custom parameters you can use with the shortcode:
-
"width" - By default, this tries to use your theme's content width. If this doesn't exist, the width is "100%". Fill in this value to enter a custom width.
-
"height" - Enter in a custom height for your Google Doc if desired. Defaults to "300". Avoid percentages.
-
"seamless" - This parameter is only applicable to Documents. If you enter "0", this will show the Google Docs header and footer. Default value is "1", which means that no Google Docs header or footer will be shown. Note: This option only works if your document was published to the web and not link-shared.
-
"size" - This parameter is only applicable to Slides. You can enter in "small", "medium" or "large" to use the presentation preset sizes. Dimensions for these presets are: small (480x299), medium (960x559), large (1440x839). To set a custom width and height, use the "width" and "height" parameters listed above instead.
-
"type" - This parameter is only applicable to non-Google Doc types. If the file you want to embed is an audio file, set the type to
audio
. Otherwise, set the type toother
for every other file type (image, PDF, Microsoft Office, etc.) and we will attempt to embed the file using Google's preview embed viewer.