IFrame

Installation

Follow these steps to install this script on your wiki.

  1. Go to Service managmenent inside the Control Panel.
  2. Under Add Service, click Local and select type Extension.
  3. Enter a descriptive name and the SID: sid://mindtouch.com/2007/12/dekiscript
  4. Add "manifest" to the config section with value set to http://scripts.mindtouch.com/iframe.xml
  5. Add extra configuration values as listed below under Configuration (If Configuration is not listed below, ignore this step.)
  6. Click on add service.

Related Links: DekiScript service, Extension Overview, DekiScript Overview, Extension Demos.


Overview

This extension contains a function for embedding <iframe> elements. This script requires MindTouch Deki 1.8.3 or later.

Functions:

  1. iframe

iframe(uri, width, height, scrolling, frameborder) : xml

Embed an iframe element.

Parameters:

NameTypeDescription
uriuriThe iframe URI.
widthnum(optional) The iframe width. (default: 425)
heightnum(optional) The iframe height. (default: 350)
scrollingbool(optional) Allow scrollbars inside the iframe. (default: no)
framebordernum(optional) Frame border thickness on the iframe. (default: 0)


Source Code

<extension>
  <title>MindTouch iFrame Extension</title>
  <copyright>Copyright (c) 2008 MindTouch, Inc.</copyright>
  <uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/iFrame</uri.help>
  <label>iFrame</label>
  <description>This extension contains a function for embedding &lt;iframe&gt; elements.</description>

  <function>
    <name>iframe</name>
    <description>Embed an iframe element.</description>
    <param name="uri" type="uri">The iframe URI.</param>
    <param name="width" type="num" optional="true">The iframe width. (default: 425)</param>
    <param name="height" type="num" optional="true">The iframe height. (default: 350)</param>
    <param name="scrolling" type="bool" optional="true">Allow scrollbars inside the iframe. (default: no)</param>
    <param name="frameborder" type="num" optional="true">Frame border thickness on the iframe. (default: 0)</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <iframe src="{{args.uri}}" width="{{web.size(args.width ?? 425)}}" height="{{web.size(args.height ?? 350)}}" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="{{args.frameborder ?? 0}}" scrolling="{{args.scrolling ? 'yes' : 'no'}}" />
        </body>
      </html>
    </return>
  </function>
</extension>

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08