History: PluginHTML
Source of version: 41
Copy to clipboard
! 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)). {REMARKSBOX(title="Note" type="warning")}Because users could potentially add unsafe scripts to a page, this plugin ((Plugin Security|must be validated)) by a trusted contributor before becoming "live" on the page. {REMARKSBOX} !! Parameters {pluginmanager plugin="html"} !!Examples !!!Basic syntax {CODE(ishtml="1" colors="tiki")} {HTML()} You can use <b>HTML here</b> including JavaScript, etc. This is unsafe and thus, must be validated by a trusted editor {HTML} {CODE} !!! Example 1 You could paste the code you get for a [http://www.google.com/webmasters/gadgets/foryourpage/index.html|Google Gadget], a [https://www.paypal.com/us/cgi-bin/webscr?cmd=_singleitem-intro-outside|PayPal button], etc. For example, using this code: {CODE(caption="Adding an HTML Iframe into a wiki page." ishtml="0" wrap="1" colors="html4strict")} {HTML()}<iframe src="//www.slideshare.net/slideshow/embed_code/1106826" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/RegisBarondeau/tikifest-montreal-mars-2009-fr" title="TikiFest Montreal Mars 2009 fr." target="_blank">TikiFest Montreal Mars 2009 fr.</a> </strong> from <strong><a href="//www.slideshare.net/RegisBarondeau" target="_blank">Régis Barondeau</a></strong> </div>{HTML} {CODE} Will produce this presentation embedded in the page: {HTML()} <iframe src="//www.slideshare.net/slideshow/embed_code/1106826" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/RegisBarondeau/tikifest-montreal-mars-2009-fr" title="TikiFest Montreal Mars 2009 fr." target="_blank">TikiFest Montreal Mars 2009 fr.</a> </strong> from <strong><a href="//www.slideshare.net/RegisBarondeau" target="_blank">Régis Barondeau</a></strong> </div> {HTML} !!! Example 2 Embedding some html object from a site serving embeddable videos (youtube, vimeo, etc): {CODE(ishtml="0" wrap="1" colors="html4strict")} {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} {CODE} However the plugin call was not validated by the admins but denied, and this is what it would produce: {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} !!! Example 3 Making a wiki link to look like a button of the same theme style that you are using. For instance, this code: {CODE(ishtml="0" wrap="1" colors="html4strict")} ^{HTML()}<a href="tiki-index.php?page=PluginHTML&itemId#Example_3" class="btn btn-primary">Save changes</a> 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}^ {CODE} Would produce: ^{HTML()}<a href="tiki-index.php?page=PluginHTML&itemId#Example_3" class="btn btn-primary">Save changes</a> 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}^ !!! Example 4 When the parameter ''wiki=1'' is used, wiki syntax will be parsed in the content inside HTML plugin. {CODE()}{HTML(wiki=1)} <div class="p-3" style="background: skyblue; box-shadow: 6px 6px 4px;"> This wiki syntax will be parsed to produce special characters: ~c~ ~amp~ ~lt~ ~gt~ ~ldq~ ~rdq~ ~lsq~ ~rsq~ ~--~ </div>{HTML}{CODE} produces: {HTML(wiki=1)} <div class="p-3" style="background: skyblue; box-shadow: 6px 6px 4px;"> This wiki syntax will be parsed to produce special characters: ~c~ ~amp~ ~lt~ ~gt~ ~ldq~ ~rdq~ ~lsq~ ~rsq~ ~--~ </div>{HTML} !! Alternatives 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 ((PluginJS)) to include JavaScript in a wiki page. !!Related pages * ((PluginTrackerList))
History
Information | Version | |||||
---|---|---|---|---|---|---|
Marc Laporte | 44 | |||||
Marc Laporte | 43 | |||||
Gary Cunningham-Lee More wiki parsing examples added to Example 4. | 42 | |||||
Gary Cunningham-Lee Added example of wiki parsing parameter (which fails in Tiki 23). | 41 | |||||
Gary Cunningham-Lee Deleted point about using HTML pages, a removed feature. | 40 | |||||
Gary Cunningham-Lee Updated button classes in example. | 39 | |||||
Yves Kipondo | 38 | |||||
Marc Laporte | 37 | |||||
macnific Reparing REMARKSBOX | 36 | |||||
lindon | 35 | |||||
Xavier de Pedro | 34 | |||||
Xavier de Pedro replace non working example of plugin html use with a working one (plus showing a tiki presentation) | 33 | |||||
luciash d' being 🧙 HTML Plugin modified by editor. | 32 | |||||
pianoliv status: review | 31 | |||||
Torsten Fabricius HTML Plugin modified by editor. | 30 | |||||
Marc Laporte | 29 | |||||
Xavier de Pedro | 27 | |||||
Xavier de Pedro | 26 | |||||
Xavier de Pedro | 25 | |||||
Xavier de Pedro | 24 | |||||
Xavier de Pedro | 23 | |||||
Xavier de Pedro | 22 | |||||
lindon | 21 | |||||
lindon | 20 | |||||
Rick Sapir / Tiki for Smarties | 19 | |||||
mlpvolt remove test plugin | 18 | |||||
mlpvolt test plugin on this page. | 17 | |||||
lindon | 16 | |||||
Jürgen Heckes | 15 | |||||
Marc Laporte | 14 | |||||
Marc Laporte | 13 | |||||
Marc Laporte | 12 | |||||
Marc Laporte | 11 | |||||
Scot Wilcoxon description | 10 | |||||
Marc Laporte | 9 | |||||
Marc Laporte | 8 | |||||
Marc Laporte | 7 | |||||
Marc Laporte | 6 | |||||
Marc Laporte Plugin modified by editor. | 5 | |||||
Marc Laporte Plugin modified by editor. | 4 | |||||
Marc Laporte Plugin modified by editor. | 3 | |||||
Marc Laporte | 2 | |||||
Marc Laporte | 1 |