Javscript in a tikiwiki syntax wiki page

Edog
Joined: 27 Oct 2005

Javscript in a tikiwiki syntax wiki page

Posted:31 Jul 2007 (21:22 UTC)
Does anybody know a way that you can include Javascript code in a tikiwiki page? Our bitweaver install is on an intranet so I don't have to worry too much about malicious posts. So, I've added <script> to the list of allowed tags. My problem is that the javascript code itself gets a
appended with each newline.

I was hoping for some kind of plugin where I can do something like
{no_parse}
// javascript code here
{/no_parse}</script>
Anonymous

Re: Javscript in a tikiwiki syntax wiki page

Posted:01 Mar 2008 (20:43 UTC)
Insert a javascript file and/or some javascript code in a wiki page

{JS(file=file.js)}javascript code{JS}

example:
{JS()}document.write("hello"){JS}
{JS(file=tiki.js)}{JS}
(the tiki.js file is in this case in the Tikiwiki root

Get the download of the mod and save the file to two places.
I find its better to create seperate files (file.js) in the root and reference them than include the script in the page.
source: (http://tikiwiki.org/tiki-index.php?page=PluginJS)