Help:GoogleDocs4MW: Difference between revisions
From Rise of Agon Wiki
Created GoogleDocs4MW documentation page |
Added GoogleDocs4MW documentation content |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:GoogleDocs4MW - Embedding Google Spreadsheets}} | |||
__NOTOC__ | |||
The '''GoogleDocs4MW''' extension allows you to embed Google Spreadsheets directly into wiki pages. | |||
== How to Use == | |||
To embed a Google Spreadsheet, use the <code><googlespreadsheet></code> tag: | |||
<syntaxhighlight lang="html"> | |||
<googlespreadsheet>SPREADSHEET_ID</googlespreadsheet> | |||
</syntaxhighlight> | |||
== Getting the Spreadsheet ID == | |||
# Open your Google Spreadsheet | |||
# Look at the URL in your browser's address bar | |||
# The URL will look like: <code>https://docs.google.com/spreadsheets/d/'''SPREADSHEET_ID'\\'/edit</code> | |||
# Copy the '''SPREADSHEET_ID''' portion (the long string of letters and numbers) | |||
# '''Important:''' Make sure the spreadsheet sharing is set to "Anyone with the link can view" | |||
== Parameters == | |||
The tag supports the following optional parameters: | |||
{| class="wikitable" | |||
! Parameter !! Description !! Default | |||
|- | |||
| width || Width of the embedded iframe in pixels || 500 | |||
|- | |||
| height || Height of the embedded iframe in pixels || 300 | |||
|- | |||
| style || Custom CSS styling for the iframe || width:100% | |||
|} | |||
== Examples == | |||
=== Basic Embedding === | |||
<syntaxhighlight lang="html"> | |||
<googlespreadsheet>1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet> | |||
</syntaxhighlight> | |||
=== Custom Size === | |||
<syntaxhighlight lang="html"> | |||
<googlespreadsheet width="800" height="600">1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet> | |||
</syntaxhighlight> | |||
=== Custom Styling === | |||
<syntaxhighlight lang="html"> | |||
<googlespreadsheet style="width:100%; border:2px solid #336699;">1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet> | |||
</syntaxhighlight> | |||
=== Responsive Design === | |||
For responsive width that adapts to different screen sizes: | |||
<syntaxhighlight lang="html"> | |||
<googlespreadsheet width="100%" height="500" style="max-width:100%; border:1px solid #ccc;">1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet> | |||
</syntaxhighlight> | |||
== Important Notes == | |||
* The Google Spreadsheet '''must be publicly accessible''' or shared with "Anyone with the link can view" permissions | |||
* Embedded spreadsheets are '''read-only''' for wiki viewers | |||
* The spreadsheet content is loaded from Google's servers in an iframe | |||
* Always verify the spreadsheet ID is correct before publishing pages | |||
* Some corporate firewalls may block embedded Google Docs content | |||
== Troubleshooting == | |||
{| class="wikitable" | |||
! Problem !! Solution | |||
|- | |||
| Spreadsheet doesn't display || Check that the sharing settings allow public viewing | |||
|- | |||
| "Permission denied" error || The spreadsheet is not publicly accessible - update sharing settings | |||
|- | |||
| Wrong spreadsheet appears || Verify you copied the correct spreadsheet ID from the URL | |||
|- | |||
| Blank frame appears || Check that the spreadsheet ID has no extra spaces or characters | |||
|} | |||
== Tips == | |||
* Use descriptive text before embedded spreadsheets to explain what readers are viewing | |||
* Consider the height parameter - too small and readers will need to scroll within the iframe | |||
* Test the embedding in preview mode before saving | |||
* For large spreadsheets, consider using a specific sheet or range if Google Sheets supports it in the future | |||
== Privacy Considerations == | |||
When embedding Google Spreadsheets: | |||
* Anyone viewing the wiki page can see the embedded content | |||
* Google may collect analytics data on views | |||
* Consider whether sensitive data should be embedded publicly | |||
* The spreadsheet owner can see view statistics in Google Sheets | |||
== See Also == | |||
* [[Help:Editing]] - General editing help | |||
* [[Help:Wiki markup]] - Wiki markup reference | |||
* [https://www.mediawiki.org/wiki/Extension:GoogleDocs4MW Extension documentation on MediaWiki.org] | |||
[[Category:Help]] | |||
[[Category:Extensions]] | |||
Latest revision as of 01:53, 29 January 2026
The GoogleDocs4MW extension allows you to embed Google Spreadsheets directly into wiki pages.
How to Use
To embed a Google Spreadsheet, use the <googlespreadsheet> tag:
<googlespreadsheet>SPREADSHEET_ID</googlespreadsheet>
Getting the Spreadsheet ID
- Open your Google Spreadsheet
- Look at the URL in your browser's address bar
- The URL will look like:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID'\\'/edit - Copy the SPREADSHEET_ID portion (the long string of letters and numbers)
- Important: Make sure the spreadsheet sharing is set to "Anyone with the link can view"
Parameters
The tag supports the following optional parameters:
| Parameter | Description | Default |
|---|---|---|
| width | Width of the embedded iframe in pixels | 500 |
| height | Height of the embedded iframe in pixels | 300 |
| style | Custom CSS styling for the iframe | width:100% |
Examples
Basic Embedding
<googlespreadsheet>1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet>
Custom Size
<googlespreadsheet width="800" height="600">1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet>
Custom Styling
<googlespreadsheet style="width:100%; border:2px solid #336699;">1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet>
Responsive Design
For responsive width that adapts to different screen sizes:
<googlespreadsheet width="100%" height="500" style="max-width:100%; border:1px solid #ccc;">1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms</googlespreadsheet>
Important Notes
- The Google Spreadsheet must be publicly accessible or shared with "Anyone with the link can view" permissions
- Embedded spreadsheets are read-only for wiki viewers
- The spreadsheet content is loaded from Google's servers in an iframe
- Always verify the spreadsheet ID is correct before publishing pages
- Some corporate firewalls may block embedded Google Docs content
Troubleshooting
| Problem | Solution |
|---|---|
| Spreadsheet doesn't display | Check that the sharing settings allow public viewing |
| "Permission denied" error | The spreadsheet is not publicly accessible - update sharing settings |
| Wrong spreadsheet appears | Verify you copied the correct spreadsheet ID from the URL |
| Blank frame appears | Check that the spreadsheet ID has no extra spaces or characters |
Tips
- Use descriptive text before embedded spreadsheets to explain what readers are viewing
- Consider the height parameter - too small and readers will need to scroll within the iframe
- Test the embedding in preview mode before saving
- For large spreadsheets, consider using a specific sheet or range if Google Sheets supports it in the future
Privacy Considerations
When embedding Google Spreadsheets:
- Anyone viewing the wiki page can see the embedded content
- Google may collect analytics data on views
- Consider whether sensitive data should be embedded publicly
- The spreadsheet owner can see view statistics in Google Sheets
See Also
- Help:Editing - General editing help
- Help:Wiki markup - Wiki markup reference
- Extension documentation on MediaWiki.org
