Difference between revisions of "Widget:GoogleDoc"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
{{#widget:GoogleDoc | {{#widget:GoogleDoc | ||
|key=1pj6gRX6dnA0B8WZams5tumAVMdCyMoUNIxP5LZeA9AA | |key=1pj6gRX6dnA0B8WZams5tumAVMdCyMoUNIxP5LZeA9AA | ||
− | | | + | |mode=copy/preview/edit |
|width=800 | |width=800 | ||
|height=400}} | |height=400}} | ||
Line 34: | Line 34: | ||
if(detectmob()){ | if(detectmob()){ | ||
− | document.getElementById('<!--{$key}-->').innerHTML = "<a href='https://docs.google.com/a/lnf.umich.edu/document/d/<!--{$key}-->/<!--{$ | + | document.getElementById('<!--{$key}-->').innerHTML = "<a href='https://docs.google.com/a/lnf.umich.edu/document/d/<!--{$key}-->/<!--{$mode|default:preview}-->' target='_blank'><b>Document Link</b></a>"; |
} else { | } else { | ||
− | document.getElementById('<!--{$key}-->').innerHTML = "<a href='https://docs.google.com/a/lnf.umich.edu/document/d/<!--{$key}-->/<!--{$ | + | document.getElementById('<!--{$key}-->').innerHTML = "<a href='https://docs.google.com/a/lnf.umich.edu/document/d/<!--{$key}-->/<!--{$mode|default:preview}-->' target='_blank'><b>Document Link</b></a><br><iframe src='https://docs.google.com/a/lnf.umich.edu/document/d/<!--{$key}-->/preview?pli=1' frameborder='0' width='<!--{$width|escape:html|default:800}-->' height='<!--{$height|escape:html|default:400}-->'></iframe>"; |
} | } | ||
Revision as of 20:31, 6 November 2016
This widget embeds an iframe and also provides a link for devices that don't support iFrames. Document will display in "preview" mode, but the link can be set to open in preview (default), edit, or copy mode.
Using this widget
{{#widget:GoogleDoc
|key=1pj6gRX6dnA0B8WZams5tumAVMdCyMoUNIxP5LZeA9AA
|mode=copy/preview/edit
|width=800
|height=400}}