10,178
edits
Changes
no edit summary
'''Widgets''' is a blanket term for easy to add HTML pages/elements. They avoid the security problems of raw HTML in editable wiki pages because the privilege to edit in the Widget namespace is managed. Most of the time you would be working with [https://www.mediawikiwidgets.org/Widgets_Catalog pre-written widgets].<br>
This is the extension is used to facilitate YouTube videos, Google Docs/Spreadsheet embeds, and more. In order to use a widget, you must make sure the Widget:Namespace is an article on this wiki. More information can be [https://www.mediawiki.org/wiki/Extension:Widgets found here], [https://www.mediawikiwidgets.org/Widgets_Catalog more widgets here].
===Specific Widgets===
====Google Document====
<pre>
{{#widget:Google Document
|id=1hhpWRL4oyH6Aqf42laXo_lElObX_1JiaV4FMt8llA_U
|width=500
|height=300
}}
</pre>
Where the id is the unique key in the URL of the spreadsheet you're trying to embed. Make sure that the document is published (''Note: this is not uniquely the same as viewable with link; on the document, navigate to File>Publish to the Web'').
====Google Spreadsheet====
Spreadsheets are essentially the same mechanism as documents (above), simply call Google Spreadsheet instead. For example:
<pre>
{{#widget:Google Spreadsheet
|key=po-s58YMwf85Q3UxRzdGOBw
|width=500
|height=300
}}
</pre>
====Google Form====
<pre>
{{#widget:Google Form
|key=po-s58YMwf85Q3UxRzdGOBw
|width=600
|height=750
}}
</pre>
====Youtube====
To call YouTube videos in documents, all you need is the video id (the unique key at the end of the video's URL). The height and width can be adjusted from the default 420x350 by adding <code>|height=xxx|width=xxx</code> after the id.<br>
<pre>
{{#widget:YouTube|id=DWef69ItVrU}}
</pre>
If you would like to embed a playlist instead, simply replace 'id=DWef69ItVrU' with 'playlist=PL6FD8256CD24CFF1F'<vr>
<pre>
{{#widget:YouTube|playlist=PL6FD8256CD24CFF1F}}
</pre>
====Google Documents====