-
Notifications
You must be signed in to change notification settings - Fork 0
Generating the Shortcode
- First, you'll need to find the shareable URL of your OneDrive file. Follow this guide, then move on to step 2.
- Then, your shortcode should look like this:
[onedrive 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:
[onedrive link="THE LINK YOU COPIED" type="image"]
Notice the type
is set to image
.
Note: Embedding images only works for OneDrive Personal accounts. This will not work with the OneDrive versions of SharePoint / Microsoft 365.
Follow the steps above, but change the shortcode to:
[onedrive 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.
Note: Embedding audio only works for OneDrive Personal accounts. This will not work with the OneDrive versions of SharePoint / Microsoft 365.
Follow the steps above, but change the shortcode to:
[onedrive link="THE LINK YOU COPIED" type="video"]
Notice the type
is set to video
. When you embed a video file, we will use the browser's native HTML5 player.
Note: Embedding video only works for OneDrive Personal accounts. This will not work with the OneDrive versions of SharePoint / Microsoft 365.
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.
-
"size" - This parameter is only applicable to PowerPoint files. You can enter in "small", "medium", "large" or "extra" to use the presentation preset sizes. Dimensions for these presets are: small (350x221), medium (610x367), large (962x565), extra (1186x691). To set a custom width and height, use the "width" and "height" parameters listed above instead.