Fullscreen
[Show/Hide Right Column]

Plugin HTML

This Wiki Plugin allows you to add any HTML (including scripts and objects) to a wiki page. This plugin was introduced in Tiki3.

Information Because users could potentially add unsafe scripts to a page, this plugin must be validated by a trusted contributor before becoming "live" on the page.



Usage and Parameters

To use this plugin in a wiki page, use the syntax:
How to use HTML plugin
{HTML()}
You can use <b>HTML here</b> including JavaScript, etc. 
This is unsafe and thus, must be validated by a trusted editor
{HTML}


Parameter Accepted values Default Effect Required? Since
wiki 0=no
1=yes
0 Parse wiki syntax included within the HTML plugin. n 3.0



There are others ways to include HTML in a page:
  • Use the WYSIWYG editor. Note that Tiki will automatically filter potentially unsafe content.
  • Enable the Allow HTML in Wiki Pages option. Note that Tiki will automatically filter potentially unsafe content.
  • Use HTML Pages instead of wiki pages. Note that HTML pages do not include page version history.

You could also use PluginJS to include JavaScript in a wiki page.


Example 1

You could paste the code you get for a Google Gadget, a PayPal button, etc.

For example, using this code:
Adding a Google Gadget to a wiki page.
{HTML()}
<script src="http://www.gmodules.com/ig/ifr?url=http://www.donalobrien.net/apps/google/currency.xml&
up_def_from=USD&up_def_to=EUR&synd=open&w=320&
h=170&title=Currency+Converter&
border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
{HTML}


Will produce this Google Gadget:


Example 2

Embedding some html object from a site serving embeddable videos (youtube, vimeo, etc)

{CENTER()}{HTML()}<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/U_CDQZLmYts&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/U_CDQZLmYts&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>{HTML}{CENTER}


Would produce:



Example 3

Making a wiki link to look like a button of the same theme style that you are using. For instance, this code:

^{HTML()}<span class="button"><a href="tiki-index.php?page=PluginHTML&itemId#Example_3">Save changes</a></span> with my custom buttom to the page PluginHTML, while you send also itemId in the url for PluginTrackerList magic, for instance (not used in this simple example){HTML}^


Would produce:

Save changes with my custom buttom to the page PluginHTML, while you send also itemId in the url for PluginTrackerList magic, for instance (not used in this simple example)



Also related (for direct reference) in one example above:




Contributors to this page: Marc Laporte8178 points  , xavi64690 points  , lindon5653 points  , Rick21710 points  , mlpvolt4266 points  , Jürgen Heckes473 points  and Scot Wilcoxon684 points  .
Page last modified on Wednesday 11 January, 2012 04:51:47 UTC by Marc Laporte8178 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki