UnsafeHtml

This extension contains functions for embedding unsafe HTML.  Related Links: Extension Overview, DekiScript Overview, Extension Demos.

Assembly: mindtouch.deki.services
SID: http://services.mindtouch.com/deki/draft/2007/06/html.unsafe

This service requires Deki Wiki 1.8.2 or later.

To enable this extension, follow these steps:

  1. Go to Service management in the Control Panel of your wiki.
  2. Under Add Service, click on Local, and select type Extension.
  3. Enter a description and the extension SID: http://services.mindtouch.com/deki/draft/2007/06/html.unsafe
  4. Add any additional configuration settings that are required by the extension (see below).
  5. Click on add service.

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:

/div/table[2]/tbody/tr[2]/td/span/pre, reference to undefined name 'unsafe'
./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.