Skip to content

MediaWiki media handler extension for Microsoft Office files, such as: docx, xlsx, pptx.

License

Notifications You must be signed in to change notification settings

metalevel-tech/mw-MSO365Embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediaWiki Extension MSO365Embed

Example 1.

MediaWiki media tag extension for embedding of Microsoft Office files, such as "docx", "docm", "xlsx", "xlsm", "pptx", "pptm", "ppsx" and "ppsm" files by using:

  • https://view.officeapps.live.com/op/embed.aspx?src=... or
  • https://view.officeapps.live.com/op/view.aspx?src=...

This extension is based on Extension:PDFEmbed and is distributed under the same license.

Examples of usage:

<mso365 width="500px" height="300px">Example.pptx</mso365>
<mso365 style="your css style">File:Example.docx</mso365>
<mso365 action='view'>File:Example.xlsx</mso365>
  • You can omit the File: part. It should handle also URLs as https://example.com/your.docx instead of File:Example.docx, etc.

Installation

Clone the extension:

cd $IP/extensions
sudo git clone https://github.com/metalevel-tech/mw-MSO365Embed.git MSO365Embed # HTTPS
sudo git clone git@github.com:metalevel-tech/mw-MSO365Embed.git MSO365Embed     # SSH

To install this extension, add the following to the end of the LocalSettings.php file:

wfLoadExtension('MSO365Embed');

Configuration

If the default configuration needs to be altered add these settings to the LocalSettings.php file below wfLoadExtension('MSO365Embed'):

$wgMSO365Embed['height'] = '696px'; // HTML tag height attribute of the wrapper DIV
$wgMSO365Embed['width'] = '100%';   // HTML tag width attribute of the wrapper DIV
$wgMSO365Embed['style'] = 'border-radius: 0; border: 1px solid #323639; margin: 8px auto 18px;'; // CSS Style ...
$wgMSO365Embed['action'] = 'embed'; // Actions: embed | view
$wgMSO365Embed['iframe'] = true;   // 'true' (default)  use Html:iframe, 'false' use Html:object
$wgGroupPermissions['*']['embed_MSO365'] = true;

See also

References

About

MediaWiki media handler extension for Microsoft Office files, such as: docx, xlsx, pptx.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages