Iframe Macro

Version 17.2 by Clemens Robbenhaar on 2014/05/30 15:41

cogAllows you to add an iframe in the page content.
TypeXAR
Category
Developed by

xwiki:XWiki.ThomasEveilleau

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

Allows you to add an iframe in the page content.

Usage

After you have installed the macro page, you can use the macro in any document in your wiki, either via the WYSIWYG editor, or by writing code like this in the wiki editor:

{{iframe url="http://www.xwiki.org" width="75%" height="350px" name="xwiki"}}
No iframe support for your browser. Bummer!
{{/iframe}}

Editing an existing iframe in the WYSIWYG editor can be a bit tricky because bringing up the edit dialog for the macro is not easy - one has to click inside the macro, but not its iframe contents, It is easier if the macro is shown in its "collapsed" form (nor showing its contents) by pressing the "Enter" key when focussing in the macro, or select "Macro" > "Collapse all" from the toolbar.

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
URLnostringnoneURL of the website you want to display in your iframe
NameyesstringiframeName of the iframe
Widthyesint +px or percentage +%100%Width of the iframe
Heightyesint +px500pxHeight of the iframe

Example

{{iframe url="http://www.google.fr" width="950" name="google"}}{{/iframe}}

Result

iframeresult.png

Installation

You can import the attached *.xar file via the XWiki Adminstration, in the "Import" section.
Afterwards the macro should be ready to use in any document.

Get Connected