Vendor MindTouch
Type Extension
Categories Advanced
Requires MindTouch 1.8.2 or later
OS Restriction None
Status Stable
License Free/Open Source
SID (service id) sid://mindtouch.com/2007/06/html.unsafe
Assembly mindtouch.deki.services

 

Description

This extension contains functions for embedding unsafe HTML.

See also How to add an extension, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.

Functions:

  1. unsafe.html
  2. unsafe.iframe
  3. unsafe.script

unsafe.html(innerhtml : str) : xml

Embed custom HTML code.

Parameters:

Name Type Description
innerhtml str An inner html fragment.

Samples:

   Output

To embed a button that displays a dialog when clicked:

<input type="button" 
       name="click" 
       value="Click Me" 
       onclick='alert("Hello World!")' />
./UnsafeHtml1.JPG

  


unsafe.iframe(uri : uri, width : num, height : num, border : bool, marginwidth : num, marginheight : num, scrolling : bool) : xml

Embed iframe element.

Parameters:

Name Type Description
uri uri Source URI.
width num Optional.  Width (default: 425)
height num Optional.  Height (default: 350)
border bool Optional.  Border (default: false)
marginwidth num Optional.  Marginwidth (default: 0)
marignheight num Optional.  Marginheight (default: 0)
scrolling bool Optional.  Scrolling (default: false)

Samples:

   Output

To embed a small Google iframe with border and scrolling:

{{ unsafe.iframe("http://www.google.com", 200, 200, true, _, _, true) }} 
./UnsafeIFrame1.JPG

  


unsafe.script(codeoruri : str, type : str) : xml

Embed script.

Parameters:

Name Type Description
codeoruri str Script code or uri
type str Optional.  Script type (default: 'text/javascript')

Samples:

   Output

To embed a script that displays a dialog:

{{ unsafe.script('alert("Hello World!")') }}
./UnsafeScript1.JPG

  

Tag page
Viewing 1 of 1 comments: view all
this page needs revising. iframe now also is one of the built-in functions. (ie. web.iframe versus unsafe.iframe)
Only unsafe.iframe seems to support properties such as scroll bars edited 23:57, 13 Mar 2008
Posted 23:51, 13 Mar 2008
Viewing 1 of 1 comments: view all
You must login to post a comment.