Widget Connector Macro
Embed online videos, slideshows, photostreams and more directly into your page with the Widget Connector macro.
The macro currently supports content from these sites:
- YouTube
- Vimeo
- MySpace Video
- Flickr
- Slide Rocket
Google Calendar
Using the Widget Connector
To add the Widget Connector to a page:
- In the Confluence editor, choose Insert > Other Macros
- Find and select the required macro
Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.
To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.
On this page:
Parameters
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Parameter | Description |
---|---|
Web Site's Widget URL | This is the external site's URL. In some sites this will be the URL shown in the address bar of your browser, and in other sites you may need to click a Share or Link button to get the URL. |
Pixel Height (Value Only) | The height of the display, in pixels. |
Pixel Width (Value Only) | The width of the display, in pixels. |
Examples
Every site is a little different, so we've put together some info on what you'll need to do to embed each site's content on a page.
YouTube
The fastest way to embed a YouTube video is to paste the URL into the editor. Confluence will autoconvert the link and insert the macro for you, like magic. Autoconvert works with both long and short YouTube URLs.
If you're pasting the URL into the Widget Connector macro URL field manually, you'll need to use the long URL (from the address bar). Long URLs look something like this https://www.youtube.com/watch?v=k6lK5hlB1nQ
.
- If you're not able to see the video in some browsers, try using https rather than http in your link.
- Links that contain a parameter to start a video at a particular time won't autoconvert or work in the Widget Connector macro, like this link:
https://www.youtube.com/watch?t=15&v=LhHKkodOPFo
. Paste in the short sharing URL to be sure it works.
Vimeo
The fastest way to embed a Vimeo video is to paste the URL into the editor. Confluence will autoconvert the link and insert the macro for you.
You can use the URL from the address bar in your browser or the Share button in Vimeo.
MySpace Video
We don't autoconvert MySpace videos, so you'll need to add the Widget Connector macro to your page first, and then paste the video's URL into the URL field.
You can use the URL from the address bar in your browser or the Sharing options in MySpace.
Flickr
You can embed a single photo, a set, an entire user's photo stream or collection of photos with a particular tag.
The fastest way is to paste a URL into the editor. This works for sets and tags. For other URLs you'll need to add the Widget Connector macro to the page first and then paste your link into the URL field.
Use the URL from the address bar in your browser.
We don't autoconvert Twitter, so you'll need to add the Widget Connector macro to your page first, and then paste the URL into the URL field.
To embed a single tweet you'll need to click the Details link on the tweet so you can grab the URL for just that tweet. The URL will look something like https://twitter.com/atlassian/status/346976521250037760
.
To embed a dynamic list of tweets you'll need to create a Widget in Twitter first:
- In Twitter, go to Settings > Widgets and create a widget to display the tweets you want to embed (for example, a user timeline, list of tweets or hashtag search).
- Save the widget, then copy the page URL. The URL should look something like this
https://twitter.com/settings/widgets/354381809263472640
(without/edit
on the end). - In Confluence, paste the URL into the Widget Connector.
- The list of tweets will display, like this one below.
SlideRocket
We don't autoconvert SlideRocket presentations, so you'll need to add the Widget Connector macro to your page first, and then paste the video's URL into the URL field.
You can get the URL from the Sharing button on the SlideRocket player.
Google Calendar
We don't autoconvert Google Calendars, so you'll need to add the Widget Connector macro to your page first, and then paste the calender address into the URL field.
You can only embed public calendars. To get your calendar's URL, in Google Calendar go to Calendar Settings > Calendar Address and click the HTML button.
The URL will look something like this: https://www.google.com/calendar/embed?src=en.australian%23holiday%40group.v.calendar.google.com&ctz=Australia/Sydney
Troubleshooting
If the Widget Connector can't display content from the external site, the macro will look like this:
We rely on the external website's APIs to display content in the Widget Connector macro. APIs do change from time to time and this can cause the Widget Connector macro to stop rendering content.
If you experience problems, you can raise an issue about it to let us know.
Code examples
The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page.
Macro name: widget
Macro body: None.
Storage format example
<ac:structured-macro ac:name="widget">
<ac:parameter ac:name="height">480</ac:parameter>
<ac:parameter ac:name="width">640</ac:parameter>
<ac:parameter ac:name="url">
<ri:url ri:value="http://youtube.com/watch?v=23pLByj_q5U"/>
</ac:parameter>
</ac:structured-macro>