I had a feeling it might be something like that - I understand that there 
is a TW "handler" involved, but it's a bit hairy trying to piece it 
together from the extant doco. Anyway, I'll work through all this here, and 
update as I go.
 
Appreciate the scope of the detail in the response.
 
Thanks, Andrew

On Saturday, 30 June 2012 23:58:42 UTC+10, PMario wrote:

> TiddlyWiki is more like an application, than an HTML page. 
>
> Everything in TW is stored inside a tiddler. While tiddlers are only 
> stored inside the HTML file, they are not automatically handeld by the 
> browsers script engine. They are handled by the TW core program. So 
> the "handling" is a bit different. 
>
> One common html way to acitvate libraries and scripts is similar to 
> this: 
>
> <html> 
>   <head> 
>     <title>Some title text</title> 
> a) <link rel="stylesheet" href="../lib/externalLibrary.css"> 
> b) <script src="../lib/externalLibrary.js"></script> 
> ... 
> c)</head> 
>   <body> 
>
> d)<script> 
>     externalLib.doSomething = function (externalGlobalVar)  { 
>        // do some stuff here. 
>     } 
>   </script> 
>
>   </body> 
> </html> 
>
> If you copy this snippet into a tiddler it will __not__ work and it 
> shouldn't, because it doesn't fit TWs structure. 
>
> ==== 
>
> In TW terms: (see markers above) 
>
> a) is done with StyleSheet tiddlers, that are activated by the TW 
> core. 
>
> b) are library tiddlers tagged systemConfig. 
>
> d) is a plugin call 
>
> ========= 
> The TW way would be similar to this: 
>
> a) 
> Copy the content of the CSS (only if it is _really_ needed) to a 
> StyleSheetLibX tiddler. If it says eg: reset.css _don't_ use it. Only 
> use library specific css. 
>
> Call this tiddler from StyleSheet 
>
> eg: StyleSheet contains 
> [[StyleSheetLibX]] 
>
> b) 
> Copy the _content_ of the externalLibrary.js into a tiddler named 
> externalLibrary.js and tag it systemConfig 
>
> c) Go to tiddlytools.com and find InlineJavascriptPlugin [1] and 
> import it to your test TW. Be sure to read and understand 
> InlineJavascriptPluginInfo! 
> tag it systemConfig. IinlineJavascriptPlugin activates the use of 
> <script></script> tags inside a tiddler. This is super cool for fast 
> prototyping, since you can use most of externalLibraries 
> documentation. If you know how things work, you should create TW 
> plugins. 
>
> d) copy something similar to 
> <script> 
>     externalLib.doSomething = function (externalGlobalVar)  { 
>        // do some stuff here. 
>     } 
>   </script> 
>
> into a tiddler. __don't__ tag it systemConfig 
>
>
> If the library documentation says something like: 
>
> <script src="bla bla"> 
>     externalLib.doSomething = function (externalGlobalVar)  { 
>        // do some stuff here. 
>     } 
> </script> 
>
> _remove_ the src="bla bla" it is not needed with inline javascript 
> plugin, if you did step a) to c) right. 
>
> ==== 
> You can use 
> <script label="clickMe"> 
> </script> 
>
> to create a button. This will make debugging easier. 
>
> For debugging you should use FireBug browser AddOn for FireFox or the 
> built in DevTools in Chrome and IE9+ 
>
> ==== 
>
> If you would have added a link to your library of desire, the examples 
> could be more prezise but imo it will give you some hints :) 
>
> have fun! 
> mario 
>
> [1] http://www.tiddlytools.com/#InlineJavascriptPlugin 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/tiddlywiki/-/XysZnRBGTX0J.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to